ConOpSys V2970  P004.07
ANVILEX control operating system
P005_03_V2_0_AI.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 //! @file P005_03_V2_0_AI.h
3 //! @brief Analog input board P005.03 V2.0 hardware driver header file.
4 //! @attention No special attention requered.
5 //! @copyright (C) 2015-2020 ANVILEX LLC
6 //! $HeadURL: https://192.168.3.4:8443/svn/P004_07/ConOpSys/Hardware/P005_03_V2_0_AI/P005_03_V2_0_AI.h $
7 //! $Revision: 2933 $
8 //! $Date: 2022-02-13 21:16:07 +0500 (So, 13 Feb 2022) $
9 //! $Author: minch $
10 //------------------------------------------------------------------------------
11 //
12 // Redistribution and use in source and binary forms, with or without
13 // modification, are permitted provided that the following conditions are met:
14 //
15 // 1. Redistributions of source code must retain the above copyright notice,
16 // this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright notice,
19 // this list of conditions and the following disclaimer in the documentation
20 // and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of ANVILEX nor the names of its contributors may be
23 // used to endorse or promote products derived from this software without
24 // specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
30 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 // POSSIBILITY OF SUCH DAMAGE.
37 //
38 //------------------------------------------------------------------------------
39 
40 #pragma once
41 
42 //------------------------------------------------------------------------------
43 // Include standard libraries header files
44 //------------------------------------------------------------------------------
45 
46 //------------------------------------------------------------------------------
47 // Include thrid party header files
48 //------------------------------------------------------------------------------
49 
50 //------------------------------------------------------------------------------
51 // Include ConOpSys header files
52 //------------------------------------------------------------------------------
53 
54 #include "Function_Block_Base.h"
55 
56 //------------------------------------------------------------------------------
57 // Include ConOpSys application header files
58 //------------------------------------------------------------------------------
59 
60 //------------------------------------------------------------------------------
61 // Macros
62 //------------------------------------------------------------------------------
63 
64 //------------------------------------------------------------------------------
65 //! @brief Analog input P005.03 V2.0 board class
66 //------------------------------------------------------------------------------
67 
69 {
70 
71  //----------------------------------------------------------------------------
72  // Public methods and variables
73  //----------------------------------------------------------------------------
74 
75  public:
76 
77  //--------------------------------------------------------------------------
78  // Public defines
79  //--------------------------------------------------------------------------
80 
81  // Register structure for generic access
82  typedef struct
83  {
84 
85  // Analog value registers
86  U16 u16_Analog_Input_Status; //!< 0x00 : Status register
87  I16 i16_Analog_Input_Data_1; //!< 0x01 : Analog input channel 1 data register as I16 value
88  I16 i16_Analog_Input_Data_2; //!< 0x02 : Analog input channel 2 data register as I16 value
89  I16 i16_Analog_Input_Data_3; //!< 0x03 : Analog input channel 3 data register as I16 value
90  U16 u16_Reserve_0x04; //!< 0x04 : Reserved
91  I16 i16_Analog_Input_Filtered_Data_1; //!< 0x05 : Analog input channel 1 filtered data register as I16 value
92  I16 i16_Analog_Input_Filtered_Data_2; //!< 0x06 : Analog input channel 2 filtered data register as I16 value
93  I16 i16_Analog_Input_Filtered_Data_3; //!< 0x07 : Analog input channel 3 filtered data register as I16 value
94 
96 
97  //--------------------------------------------------------------------------
98  // Public methods
99  //--------------------------------------------------------------------------
100 
101  //!-------------------------------------------------------------------------
102  //! @brief Class constructor method.
103  //! @note None
104  //! \par Override
105  //! Not allowed
106  //! @attention Don't call this method directly.
107  //--------------------------------------------------------------------------
108 
110 
111  //!-------------------------------------------------------------------------
112  //! @brief Class destructor method.
113  //! @note None
114  //! \par Override
115  //! Not allowed
116  //! @attention Don't call this method directly.
117  //--------------------------------------------------------------------------
118 
119  virtual ~TP005_03_V2_0_AI();
120 
121  //!-------------------------------------------------------------------------
122  //! @brief Memory map method.
123  //! @note None
124  //! @param [in] *struct_Registers_Base_Address - Base address within FPGA address space
125  //! \par Override
126  //! Not allowed
127  //! @attention None
128  //--------------------------------------------------------------------------
129 
130  VOID Map( TP005_03_V2_0_AI_Registers *struct_Registers_Base_Address );
131 
132  //!-------------------------------------------------------------------------
133  //! @brief Object initialization method.
134  //! @note None
135  //! \par Override
136  //! Not allowed
137  //! @attention None
138  //--------------------------------------------------------------------------
139 
140  virtual VOID Init();
141 
142  //!-------------------------------------------------------------------------
143  //! @brief Object excutable method.
144  //! @note Is an endless loop
145  //! \par Override
146  //! Not allowed
147  //! @attention None
148  //--------------------------------------------------------------------------
149 
150  virtual VOID Execute();
151 
152  //!-------------------------------------------------------------------------
153  //! @brief Send information method.
154  //! @note None
155  //! \par Override
156  //! Not allowed
157  //! @attention None
158  //--------------------------------------------------------------------------
159 
160  virtual VOID Send_Information( TProtocol_Base *object_Protocol );
161 
162  //--------------------------------------------------------------------------
163  // Function block parameters
164  //--------------------------------------------------------------------------
165 
166  //! @brief Analog input channel 1 fill scale value. Also used for channel total gain adjustment.
168 
169  //! @brief Analog input channel 1 fill scale value. Also used for channel total gain adjustment.
171 
172  //! @brief Analog input channel 1 fill scale value. Also used for channel total gain adjustment.
174 
175  //! @brief Analog input channel 1 offset
177 
178  //! @brief Analog input channel 2 offset
180 
181  //! @brief Analog input channel 3 offset
183 
184  //! @brief Negate analog input data
186 
187  //--------------------------------------------------------------------------
188  // Function block inputs
189  //--------------------------------------------------------------------------
190 
191  //! @brief Software defined overcurrent level
193 
194  //--------------------------------------------------------------------------
195  // Function block outputs
196  //--------------------------------------------------------------------------
197 
198  //! @brief Analog input status
200 
201  //! @brief Analog input channel 1 block output as I16
203 
204  //! @brief Analog input channel 2 block output as I16
206 
207  //! @brief Analog input channel 3 block output as I16
209 
210  //! @brief Analog input channel 1 block output
212 
213  //! @brief Analog input channel 2 block output
215 
216  //! @brief Analog input channel 3 block output
218 
219  //! @brief Analog input channels DC offset
221 
222  //! @brief Critical hardware error flag
224 
225  //! @brief Signal symmery error flag
227 
228  //! @brief Hardware overcurrent limit
230 
231  //! @brief Software overcurrent limit
233 
234  //----------------------------------------------------------------------------
235  // Protected methods and variables
236  //----------------------------------------------------------------------------
237 
238  protected:
239 
240  //----------------------------------------------------------------------------
241  // Private methods and variables
242  //----------------------------------------------------------------------------
243 
244  private:
245 
246  typedef union
247  {
249  struct
250  {
254  U16 :1; // Bit 3
255  U16 :1; // Bit 4
256  U16 :1; // Bit 5
257  U16 :1; // Bit 6
261  U16 u16_CMP_N_2_Status:1; // Bit 10
262  U16 u16_CMP_P_3_Status:1; // Bit 11
263  U16 u16_CMP_N_3_Status:1; // Bit 12
264  U16 :1; // Bit 13
265  U16 :1; // Bit 14
266  U16 :1; // Bit 15
267  };
268  } TStatus;
269 
270  //! @brief Hardware mapped registers
272 
273  //! @brief Effective gain of the channel 1
274  F32 f32_Gain_1 = (F32)1.0f;
275 
276  //! @brief Effective gain of the channel 2
277  F32 f32_Gain_2 = (F32)1.0f;
278 
279  //! @brief Effective gain of the channel 3
280  F32 f32_Gain_3 = (F32)1.0f;
281 
282  //! @brief Effective offset of the channel 1
283  F32 f32_Offset_1 = (F32)0.0f;
284 
285  //! @brief Effective offset of the channel 2
286  F32 f32_Offset_2 = (F32)0.0f;
287 
288  //! @brief Effective offset of the channel 3
289  F32 f32_Offset_3 = (F32)0.0f;
290 
291 };
292 
293 //------------------------------------------------------------------------------
294 
295 //! @brief Analog input driver: class 600 mA
297 {
298 
299  //----------------------------------------------------------------------------
300  // Public methods and variables
301  //----------------------------------------------------------------------------
302 
303  public:
304 
305  //! @brief Register structure for generic access
306  typedef struct
307  {
308 
309  //! @brief 0x00 : Unit identification L read register
311 
312  //! @brief 0x01 : Unit identification H read register
314 
315  union
316  {
317 
318  //! @brief 0x02 : Status register
320 
321  //! @brief 0x02 : Control register
323 
324  };
325 
326  //! @brief 0x03 : Analog input channel 1 data register as I16 value
328 
329  //! @brief 0x04 : Analog input channel 2 data register as I16 value
331 
332  //! @brief 0x05 : Analog input channel 3 data register as I16 value
334 
336 
337  //--------------------------------------------------------------------------
338  // Public methods
339  //--------------------------------------------------------------------------
340 
341  //!-------------------------------------------------------------------------
342  //! @brief Class constructor method.
343  //! @note None
344  //! \par Override
345  //! Not allowed
346  //! @attention Don't call this method directly.
347  //--------------------------------------------------------------------------
348 
350 
351  //!-------------------------------------------------------------------------
352  //! @brief Class destructor method.
353  //! @note None
354  //! \par Override
355  //! Not allowed
356  //! @attention Don't call this method directly.
357  //--------------------------------------------------------------------------
358 
359  virtual ~TP005_03_V2_0_AI_T2(); //!< Destructor method
360 
361  //!-------------------------------------------------------------------------
362  //! @brief Memory map method.
363  //! @note None
364  //! @param [in] *struct_Registers_Base_Address - Base address within FPGA address space
365  //! \par Override
366  //! Not allowed
367  //! @attention None
368  //--------------------------------------------------------------------------
369 
370  VOID Map( TP005_03_V2_0_AI_Registers *struct_Registers_Base_Address );
371 
372  //!-------------------------------------------------------------------------
373  //! @brief Object initialization method.
374  //! @note None
375  //! \par Override
376  //! Not allowed
377  //! @attention None
378  //--------------------------------------------------------------------------
379 
380  virtual VOID Init();
381 
382  //!-------------------------------------------------------------------------
383  //! @brief Object excutable method.
384  //! @note Is an endless loop
385  //! \par Override
386  //! Not allowed
387  //! @attention None
388  //--------------------------------------------------------------------------
389 
390  virtual VOID Execute();
391 
392  //!-------------------------------------------------------------------------
393  //! @brief Send information method.
394  //! @note None
395  //! \par Override
396  //! Not allowed
397  //! @attention None
398  //--------------------------------------------------------------------------
399 
400  virtual VOID Send_Information( TProtocol_Base *object_Protocol );
401 
402  //--------------------------------------------------------------------------
403  // Block inputs
404  //--------------------------------------------------------------------------
405 
406  //--------------------------------------------------------------------------
407  // Block outputs
408  //--------------------------------------------------------------------------
409 
410  //! @brief Analog input channel 1 block output
412 
413  //! @brief Analog input channel 2 block output
415 
416  //! @brief Analog input channel 3 block output
418 
419  //! @brief Analog input channel 1 block output
421 
422  //! @brief Analog input channel 2 block output
424 
425  //! @brief Analog input channel 3 block output
427 
428  //! @brief Positive comparator data for channel 1
430 
431  //! @brief Negative comparator data for channel 1
433 
434  //! @brief Positive comparator data for channel 2
436 
437  //! @brief Negative comparator data for channel 2
439 
440  //! @brief Positive comparator data for channel 3
442 
443  //! @brief Negative comparator data for channel 3
445 
446  //----------------------------------------------------------------------------
447  // Protected methods and variables
448  //----------------------------------------------------------------------------
449 
450  protected:
451 
452  //----------------------------------------------------------------------------
453  // Private methods and variables
454  //----------------------------------------------------------------------------
455 
456  private:
457 
458  //--------------------------------------------------------------------------
459  // Private defines
460  //--------------------------------------------------------------------------
461 
462  typedef union
463  {
465  struct
466  {
467  U16 :1; // Bit 0
468  U16 :1; // Bit 1
469  U16 :1; // Bit 2
470  U16 :1; // Bit 3
471  U16 :1; // Bit 4
472  U16 :1; // Bit 5
473  U16 :1; // Bit 6
477  U16 u16_CMP_N_2_Status:1; // Bit 10
478  U16 u16_CMP_P_3_Status:1; // Bit 11
479  U16 u16_CMP_N_3_Status:1; // Bit 12
480  U16 :1; // Bit 13
481  U16 :1; // Bit 14
482  U16 :1; // Bit 15
483  };
484  } TStatus;
485 
486  //--------------------------------------------------------------------------
487  // Private variables
488  //--------------------------------------------------------------------------
489 
490  //! @brief Hardware mapped registers
492 
493  //! @brief Effective gain of the channels
495 
496  //! @brief Value limit
497  //F32 f32_Value_Limit = (U32)600.0f;
498  //F32 f32_Value_Limit = (U32)632.85f;
499  F32 f32_Value_Limit = (U32)632.364248f;
500 
501  //! @brief Code limit
502  F32 f32_Code_Limit = (F32)32768.0f;
503 
504  //! @brief Analog input status
506 
507 };
508 
509 //! @brief Analog input driver: class 1500 mA
511 {
512 
513  //----------------------------------------------------------------------------
514  // Public methods and variables
515  //----------------------------------------------------------------------------
516 
517  public:
518 
519  //--------------------------------------------------------------------------
520  // Public defines
521  //--------------------------------------------------------------------------
522 
523  //! @brief Register structure for generic access
524  typedef struct
525  {
526 
527  //! @brief 0x00 : Unit identification L read register
529 
530  //! @brief 0x01 : Unit identification H read register
532 
533  union
534  {
535 
536  //! @brief 0x02 : Status register
538 
539  //! @brief 0x02 : Control register
541 
542  };
543 
544  //! @brief 0x03 : Analog input channel 1 data register as I16 value
546 
547  //! @brief 0x04 : Analog input channel 2 data register as I16 value
549 
550  //! @brief 0x05 : Analog input channel 3 data register as I16 value
552 
554 
555  //--------------------------------------------------------------------------
556  // Public methods
557  //--------------------------------------------------------------------------
558 
559  //!-------------------------------------------------------------------------
560  //! @brief Class constructor method.
561  //! @note None
562  //! \par Override
563  //! Not allowed
564  //! @attention Don't call this method directly.
565  //--------------------------------------------------------------------------
566 
568 
569  //!-------------------------------------------------------------------------
570  //! @brief Class destructor method.
571  //! @note None
572  //! \par Override
573  //! Not allowed
574  //! @attention Don't call this method directly.
575  //--------------------------------------------------------------------------
576 
577  virtual ~TP005_03_V2_0_AI_T3(); //!< Destructor method
578 
579  //!-------------------------------------------------------------------------
580  //! @brief Memory map method.
581  //! @note None
582  //! @param [in] *struct_Registers_Base_Address - Base address within FPGA address space
583  //! \par Override
584  //! Not allowed
585  //! @attention None
586  //--------------------------------------------------------------------------
587 
588  VOID Map( TP005_03_V2_0_AI_Registers *struct_Registers_Base_Address );
589 
590  //!-------------------------------------------------------------------------
591  //! @brief Object initialization method.
592  //! @note None
593  //! \par Override
594  //! Not allowed
595  //! @attention None
596  //--------------------------------------------------------------------------
597 
598  virtual VOID Init();
599 
600  //!-------------------------------------------------------------------------
601  //! @brief Object excutable method.
602  //! @note Is an endless loop
603  //! \par Override
604  //! Not allowed
605  //! @attention None
606  //--------------------------------------------------------------------------
607 
608  virtual VOID Execute();
609 
610  //!-------------------------------------------------------------------------
611  //! @brief Send information method.
612  //! @note None
613  //! \par Override
614  //! Not allowed
615  //! @attention None
616  //--------------------------------------------------------------------------
617 
618  virtual VOID Send_Information( TProtocol_Base *object_Protocol );
619 
620  //--------------------------------------------------------------------------
621  // Block inputs
622  //--------------------------------------------------------------------------
623 
624  //--------------------------------------------------------------------------
625  // Block outputs
626  //--------------------------------------------------------------------------
627 
628  //! @brief Analog input channel 1 block output
630 
631  //! @brief Analog input channel 2 block output
633 
634  //! @brief Analog input channel 3 block output
636 
637  //! @brief Analog input channel 1 block output
639 
640  //! @brief Analog input channel 2 block output
642 
643  //! @brief Analog input channel 3 block output
645 
646  //! @brief Positive comparator data for channel 1
648 
649  //! @brief Negative comparator data for channel 1
651 
652  //! @brief Positive comparator data for channel 2
654 
655  //! @brief Negative comparator data for channel 2
657 
658  //! @brief Positive comparator data for channel 3
660 
661  //! @brief Negative comparator data for channel 3
663 
664  //----------------------------------------------------------------------------
665  // Protected methods and variables
666  //----------------------------------------------------------------------------
667 
668  protected:
669 
670  //----------------------------------------------------------------------------
671  // Private methods and variables
672  //----------------------------------------------------------------------------
673 
674  private:
675 
676  //--------------------------------------------------------------------------
677  // Private defines
678  //--------------------------------------------------------------------------
679 
680  typedef union
681  {
683  struct
684  {
685  U16 :1; // Bit 0
686  U16 :1; // Bit 1
687  U16 :1; // Bit 2
688  U16 :1; // Bit 3
689  U16 :1; // Bit 4
690  U16 :1; // Bit 5
691  U16 :1; // Bit 6
695  U16 u16_CMP_N_2_Status:1; // Bit 10
696  U16 u16_CMP_P_3_Status:1; // Bit 11
697  U16 u16_CMP_N_3_Status:1; // Bit 12
698  U16 :1; // Bit 13
699  U16 :1; // Bit 14
700  U16 :1; // Bit 15
701  };
702  } TStatus;
703 
704  //--------------------------------------------------------------------------
705  // Private variables
706  //--------------------------------------------------------------------------
707 
708  //! @brief Hardware mapped registers
710 
711  //! @brief Effective gain of the channels
713 
714  //! @brief Value limit
715  F32 f32_Value_Limit = (U32)2353.529302f;
716 
717  //! @brief Code limit
718  F32 f32_Code_Limit = (F32)32768.0f;
719 
720  //! @brief Analog input status
722 
723 };
724 
725 //! @brief Analog input driver: class 100 mA
727 {
728 
729  //----------------------------------------------------------------------------
730  // Public methods and variables
731  //----------------------------------------------------------------------------
732 
733  public:
734 
735  //--------------------------------------------------------------------------
736  // Public defines
737  //--------------------------------------------------------------------------
738 
739  //! @brief Register structure for generic access
740  typedef struct
741  {
742 
743  //! @brief 0x00 : Unit identification L read register
745 
746  //! @brief 0x01 : Unit identification H read register
748 
749  union
750  {
751 
752  //! @brief 0x02 : Status register
754 
755  //! @brief 0x02 : Control register
757 
758  };
759 
760  //! @brief 0x03 : Analog input channel 1 data register as I16 value
762 
763  //! @brief 0x04 : Analog input channel 2 data register as I16 value
765 
766  //! @brief 0x05 : Analog input channel 3 data register as I16 value
768 
770 
771  //--------------------------------------------------------------------------
772  // Public methods
773  //--------------------------------------------------------------------------
774 
775  //!-------------------------------------------------------------------------
776  //! @brief Class constructor method.
777  //! @note None
778  //! \par Override
779  //! Not allowed
780  //! @attention Don't call this method directly.
781  //--------------------------------------------------------------------------
782 
784 
785  //!-------------------------------------------------------------------------
786  //! @brief Class destructor method.
787  //! @note None
788  //! \par Override
789  //! Not allowed
790  //! @attention Don't call this method directly.
791  //--------------------------------------------------------------------------
792 
793  virtual ~TP005_03_V2_0_AI_T4(); //!< Destructor method
794 
795  //!-------------------------------------------------------------------------
796  //! @brief Memory map method.
797  //! @note None
798  //! @param [in] *struct_Registers_Base_Address - Base address within FPGA address space
799  //! \par Override
800  //! Not allowed
801  //! @attention None
802  //--------------------------------------------------------------------------
803 
804  VOID Map( TP005_03_V2_0_AI_Registers *struct_Registers_Base_Address );
805 
806  //!-------------------------------------------------------------------------
807  //! @brief Object initialization method.
808  //! @note None
809  //! \par Override
810  //! Not allowed
811  //! @attention None
812  //--------------------------------------------------------------------------
813 
814  virtual VOID Init();
815 
816  //!-------------------------------------------------------------------------
817  //! @brief Object excutable method.
818  //! @note Is an endless loop
819  //! \par Override
820  //! Not allowed
821  //! @attention None
822  //--------------------------------------------------------------------------
823 
824  virtual VOID Execute();
825 
826  //!-------------------------------------------------------------------------
827  //! @brief Send information method.
828  //! @note None
829  //! \par Override
830  //! Not allowed
831  //! @attention None
832  //--------------------------------------------------------------------------
833 
834  virtual VOID Send_Information( TProtocol_Base *object_Protocol );
835 
836  //--------------------------------------------------------------------------
837  // Block inputs
838  //--------------------------------------------------------------------------
839 
840  //--------------------------------------------------------------------------
841  // Block outputs
842  //--------------------------------------------------------------------------
843 
844  //! @brief Analog input channel 1 block output
846 
847  //! @brief Analog input channel 2 block output
849 
850  //! @brief Analog input channel 3 block output
852 
853  //! @brief Analog input channel 1 block output
855 
856  //! @brief Analog input channel 2 block output
858 
859  //! @brief Analog input channel 3 block output
861 
862  //! @brief Positive comparator data for channel 1
864 
865  //! @brief Negative comparator data for channel 1
867 
868  //! @brief Positive comparator data for channel 2
870 
871  //! @brief Negative comparator data for channel 2
873 
874  //! @brief Positive comparator data for channel 3
876 
877  //! @brief Negative comparator data for channel 3
879 
880  //----------------------------------------------------------------------------
881  // Protected methods and variables
882  //----------------------------------------------------------------------------
883 
884  protected:
885 
886  //----------------------------------------------------------------------------
887  // Private methods and variables
888  //----------------------------------------------------------------------------
889 
890  private:
891 
892  //--------------------------------------------------------------------------
893  // Private defines
894  //--------------------------------------------------------------------------
895 
896  typedef union
897  {
899  struct
900  {
901  U16 :1; // Bit 0
902  U16 :1; // Bit 1
903  U16 :1; // Bit 2
904  U16 :1; // Bit 3
905  U16 :1; // Bit 4
906  U16 :1; // Bit 5
907  U16 :1; // Bit 6
911  U16 u16_CMP_N_2_Status:1; // Bit 10
912  U16 u16_CMP_P_3_Status:1; // Bit 11
913  U16 u16_CMP_N_3_Status:1; // Bit 12
914  U16 :1; // Bit 13
915  U16 :1; // Bit 14
916  U16 :1; // Bit 15
917  };
918  } TStatus;
919 
920  //--------------------------------------------------------------------------
921  // Private variables
922  //--------------------------------------------------------------------------
923 
924  //! @brief Hardware mapped registers
926 
927  //! @brief Effective gain of the channels
929 
930  //! @brief Value limit
931  F32 f32_Value_Limit = (U32)115.002f;
932 
933  //! @brief Code limit
934  F32 f32_Code_Limit = (F32)32768.0f;
935 
936  //! @brief Analog input status
938 
939 };
940 
941 //------------------------------------------------------------------------------
942 // End of file
943 //------------------------------------------------------------------------------
#define NULL
Definition: Defines.h:388
void VOID
Datatypesess datatype definition.
Definition: Defines.h:105
unsigned long U32
Binary 32-Bit unsigned integer datatype defenition.
Definition: Defines.h:203
float F32
IEEE-754 32-Bit single presession floating point numbers datatype defenition.
Definition: Defines.h:324
short I16
2s Compliment 16-Bit signed integer datatype defenition
Definition: Defines.h:196
unsigned short U16
Binary 16-Bit unsigned integer datatype defenition.
Definition: Defines.h:193
Function block base class header file.
Function block input connector class.
Definition: Block_Input_Connector.h:83
Function block output connector class.
Definition: Block_Output_Connector.h:59
Function block base class for device.
Definition: Function_Block_Base.h:96
Analog input driver: class 600 mA.
Definition: P005_03_V2_0_AI.h:297
virtual VOID Execute()
Object excutable method.
Definition: P005_03_V2_0_AI.cpp:325
TBlock_Output_Connector object_i16_Analog_Pure_Input_Data_2
Analog input channel 2 block output.
Definition: P005_03_V2_0_AI.h:423
VOID Map(TP005_03_V2_0_AI_Registers *struct_Registers_Base_Address)
Memory map method.
Definition: P005_03_V2_0_AI.cpp:301
TBlock_Output_Connector object_bool_CMP_N_2_Status
Negative comparator data for channel 2.
Definition: P005_03_V2_0_AI.h:438
TP005_03_V2_0_AI_T2()
Class constructor method.
Definition: P005_03_V2_0_AI.cpp:263
volatile TP005_03_V2_0_AI_Registers * struct_Registers
Hardware mapped registers.
Definition: P005_03_V2_0_AI.h:491
TBlock_Output_Connector object_f32_Analog_Input_Data_1
Analog input channel 1 block output.
Definition: P005_03_V2_0_AI.h:411
TBlock_Output_Connector object_f32_Analog_Input_Data_3
Analog input channel 3 block output.
Definition: P005_03_V2_0_AI.h:417
virtual ~TP005_03_V2_0_AI_T2()
Class destructor method.
Definition: P005_03_V2_0_AI.cpp:293
TBlock_Output_Connector object_i16_Analog_Pure_Input_Data_1
Analog input channel 1 block output.
Definition: P005_03_V2_0_AI.h:420
virtual VOID Init()
Object initialization method.
Definition: P005_03_V2_0_AI.cpp:313
TBlock_Output_Connector object_bool_CMP_P_3_Status
Positive comparator data for channel 3.
Definition: P005_03_V2_0_AI.h:441
TBlock_Output_Connector object_f32_Analog_Input_Data_2
Analog input channel 2 block output.
Definition: P005_03_V2_0_AI.h:414
F32 f32_Gain
Effective gain of the channels.
Definition: P005_03_V2_0_AI.h:494
TStatus struct_Status
Analog input status.
Definition: P005_03_V2_0_AI.h:505
F32 f32_Value_Limit
Value limit.
Definition: P005_03_V2_0_AI.h:499
TBlock_Output_Connector object_bool_CMP_P_2_Status
Positive comparator data for channel 2.
Definition: P005_03_V2_0_AI.h:435
TBlock_Output_Connector object_i16_Analog_Pure_Input_Data_3
Analog input channel 3 block output.
Definition: P005_03_V2_0_AI.h:426
TBlock_Output_Connector object_bool_CMP_N_1_Status
Negative comparator data for channel 1.
Definition: P005_03_V2_0_AI.h:432
TBlock_Output_Connector object_bool_CMP_P_1_Status
Positive comparator data for channel 1.
Definition: P005_03_V2_0_AI.h:429
F32 f32_Code_Limit
Code limit.
Definition: P005_03_V2_0_AI.h:502
TBlock_Output_Connector object_bool_CMP_N_3_Status
Negative comparator data for channel 3.
Definition: P005_03_V2_0_AI.h:444
virtual VOID Send_Information(TProtocol_Base *object_Protocol)
Send information method.
Definition: P005_03_V2_0_AI.cpp:362
Analog input driver: class 1500 mA.
Definition: P005_03_V2_0_AI.h:511
virtual ~TP005_03_V2_0_AI_T3()
Class destructor method.
Definition: P005_03_V2_0_AI.cpp:434
F32 f32_Gain
Effective gain of the channels.
Definition: P005_03_V2_0_AI.h:712
TBlock_Output_Connector object_f32_Analog_Input_Data_1
Analog input channel 1 block output.
Definition: P005_03_V2_0_AI.h:629
TBlock_Output_Connector object_bool_CMP_N_3_Status
Negative comparator data for channel 3.
Definition: P005_03_V2_0_AI.h:662
TBlock_Output_Connector object_bool_CMP_P_2_Status
Positive comparator data for channel 2.
Definition: P005_03_V2_0_AI.h:653
TStatus struct_Status
Analog input status.
Definition: P005_03_V2_0_AI.h:721
F32 f32_Value_Limit
Value limit.
Definition: P005_03_V2_0_AI.h:715
TBlock_Output_Connector object_f32_Analog_Input_Data_2
Analog input channel 2 block output.
Definition: P005_03_V2_0_AI.h:632
TP005_03_V2_0_AI_T3()
Class constructor method.
Definition: P005_03_V2_0_AI.cpp:404
TBlock_Output_Connector object_bool_CMP_N_2_Status
Negative comparator data for channel 2.
Definition: P005_03_V2_0_AI.h:656
virtual VOID Execute()
Object excutable method.
Definition: P005_03_V2_0_AI.cpp:466
TBlock_Output_Connector object_i16_Analog_Pure_Input_Data_2
Analog input channel 2 block output.
Definition: P005_03_V2_0_AI.h:641
TBlock_Output_Connector object_bool_CMP_P_1_Status
Positive comparator data for channel 1.
Definition: P005_03_V2_0_AI.h:647
TBlock_Output_Connector object_bool_CMP_N_1_Status
Negative comparator data for channel 1.
Definition: P005_03_V2_0_AI.h:650
virtual VOID Init()
Object initialization method.
Definition: P005_03_V2_0_AI.cpp:454
volatile TP005_03_V2_0_AI_Registers * struct_Registers
Hardware mapped registers.
Definition: P005_03_V2_0_AI.h:709
virtual VOID Send_Information(TProtocol_Base *object_Protocol)
Send information method.
Definition: P005_03_V2_0_AI.cpp:503
TBlock_Output_Connector object_f32_Analog_Input_Data_3
Analog input channel 3 block output.
Definition: P005_03_V2_0_AI.h:635
TBlock_Output_Connector object_i16_Analog_Pure_Input_Data_3
Analog input channel 3 block output.
Definition: P005_03_V2_0_AI.h:644
TBlock_Output_Connector object_i16_Analog_Pure_Input_Data_1
Analog input channel 1 block output.
Definition: P005_03_V2_0_AI.h:638
F32 f32_Code_Limit
Code limit.
Definition: P005_03_V2_0_AI.h:718
TBlock_Output_Connector object_bool_CMP_P_3_Status
Positive comparator data for channel 3.
Definition: P005_03_V2_0_AI.h:659
VOID Map(TP005_03_V2_0_AI_Registers *struct_Registers_Base_Address)
Memory map method.
Definition: P005_03_V2_0_AI.cpp:442
Analog input driver: class 100 mA.
Definition: P005_03_V2_0_AI.h:727
F32 f32_Value_Limit
Value limit.
Definition: P005_03_V2_0_AI.h:931
TBlock_Output_Connector object_f32_Analog_Input_Data_3
Analog input channel 3 block output.
Definition: P005_03_V2_0_AI.h:851
virtual VOID Send_Information(TProtocol_Base *object_Protocol)
Send information method.
Definition: P005_03_V2_0_AI.cpp:644
TBlock_Output_Connector object_f32_Analog_Input_Data_2
Analog input channel 2 block output.
Definition: P005_03_V2_0_AI.h:848
volatile TP005_03_V2_0_AI_Registers * struct_Registers
Hardware mapped registers.
Definition: P005_03_V2_0_AI.h:925
F32 f32_Code_Limit
Code limit.
Definition: P005_03_V2_0_AI.h:934
VOID Map(TP005_03_V2_0_AI_Registers *struct_Registers_Base_Address)
Memory map method.
Definition: P005_03_V2_0_AI.cpp:583
TBlock_Output_Connector object_i16_Analog_Pure_Input_Data_1
Analog input channel 1 block output.
Definition: P005_03_V2_0_AI.h:854
TBlock_Output_Connector object_i16_Analog_Pure_Input_Data_3
Analog input channel 3 block output.
Definition: P005_03_V2_0_AI.h:860
TP005_03_V2_0_AI_T4()
Class constructor method.
Definition: P005_03_V2_0_AI.cpp:545
TStatus struct_Status
Analog input status.
Definition: P005_03_V2_0_AI.h:937
TBlock_Output_Connector object_bool_CMP_P_3_Status
Positive comparator data for channel 3.
Definition: P005_03_V2_0_AI.h:875
virtual VOID Execute()
Object excutable method.
Definition: P005_03_V2_0_AI.cpp:607
TBlock_Output_Connector object_bool_CMP_P_2_Status
Positive comparator data for channel 2.
Definition: P005_03_V2_0_AI.h:869
TBlock_Output_Connector object_bool_CMP_N_1_Status
Negative comparator data for channel 1.
Definition: P005_03_V2_0_AI.h:866
TBlock_Output_Connector object_i16_Analog_Pure_Input_Data_2
Analog input channel 2 block output.
Definition: P005_03_V2_0_AI.h:857
TBlock_Output_Connector object_bool_CMP_N_2_Status
Negative comparator data for channel 2.
Definition: P005_03_V2_0_AI.h:872
virtual VOID Init()
Object initialization method.
Definition: P005_03_V2_0_AI.cpp:595
F32 f32_Gain
Effective gain of the channels.
Definition: P005_03_V2_0_AI.h:928
TBlock_Output_Connector object_bool_CMP_P_1_Status
Positive comparator data for channel 1.
Definition: P005_03_V2_0_AI.h:863
TBlock_Output_Connector object_bool_CMP_N_3_Status
Negative comparator data for channel 3.
Definition: P005_03_V2_0_AI.h:878
virtual ~TP005_03_V2_0_AI_T4()
Class destructor method.
Definition: P005_03_V2_0_AI.cpp:575
TBlock_Output_Connector object_f32_Analog_Input_Data_1
Analog input channel 1 block output.
Definition: P005_03_V2_0_AI.h:845
Analog input P005.03 V2.0 board class.
Definition: P005_03_V2_0_AI.h:69
TBlock_Input_Connector object_f32_Analog_Input_Full_Scale_3
Analog input channel 1 fill scale value. Also used for channel total gain adjustment.
Definition: P005_03_V2_0_AI.h:173
TBlock_Input_Connector object_f32_Analog_Input_Offset_2
Analog input channel 2 offset.
Definition: P005_03_V2_0_AI.h:179
TBlock_Output_Connector object_f32_Analog_Input_Data_1
Analog input channel 1 block output.
Definition: P005_03_V2_0_AI.h:211
virtual VOID Init()
Object initialization method.
Definition: P005_03_V2_0_AI.cpp:138
I16 i16_Analog_Input_Data_2
Analog input channel 2 block output as I16.
Definition: P005_03_V2_0_AI.h:205
TBlock_Output_Connector object_bool_Hardware_Error
Critical hardware error flag.
Definition: P005_03_V2_0_AI.h:223
virtual VOID Execute()
Object excutable method.
Definition: P005_03_V2_0_AI.cpp:161
F32 f32_Offset_3
Effective offset of the channel 3.
Definition: P005_03_V2_0_AI.h:289
I16 i16_Analog_Input_Data_3
Analog input channel 3 block output as I16.
Definition: P005_03_V2_0_AI.h:208
TBlock_Input_Connector object_f32_Analog_Input_Offset_3
Analog input channel 3 offset.
Definition: P005_03_V2_0_AI.h:182
F32 f32_Gain_2
Effective gain of the channel 2.
Definition: P005_03_V2_0_AI.h:277
VOID Map(TP005_03_V2_0_AI_Registers *struct_Registers_Base_Address)
Memory map method.
Definition: P005_03_V2_0_AI.cpp:126
virtual VOID Send_Information(TProtocol_Base *object_Protocol)
Send information method.
Definition: P005_03_V2_0_AI.cpp:203
F32 f32_Offset_1
Effective offset of the channel 1.
Definition: P005_03_V2_0_AI.h:283
F32 f32_Gain_3
Effective gain of the channel 3.
Definition: P005_03_V2_0_AI.h:280
TBlock_Input_Connector object_f32_Analog_Input_Offset_1
Analog input channel 1 offset.
Definition: P005_03_V2_0_AI.h:176
F32 f32_Offset_2
Effective offset of the channel 2.
Definition: P005_03_V2_0_AI.h:286
TP005_03_V2_0_AI()
Class constructor method.
Definition: P005_03_V2_0_AI.cpp:68
U16 u16_Analog_Input_Status
Analog input status.
Definition: P005_03_V2_0_AI.h:199
TBlock_Input_Connector object_f32_Analog_Input_Full_Scale_2
Analog input channel 1 fill scale value. Also used for channel total gain adjustment.
Definition: P005_03_V2_0_AI.h:170
TBlock_Input_Connector object_bool_Negate
Negate analog input data.
Definition: P005_03_V2_0_AI.h:185
TBlock_Output_Connector object_bool_Symmenty_Error
Signal symmery error flag.
Definition: P005_03_V2_0_AI.h:226
F32 f32_Gain_1
Effective gain of the channel 1.
Definition: P005_03_V2_0_AI.h:274
virtual ~TP005_03_V2_0_AI()
Class destructor method.
Definition: P005_03_V2_0_AI.cpp:118
TBlock_Output_Connector object_bool_Magnitude_Hardware_Level_Error
Hardware overcurrent limit.
Definition: P005_03_V2_0_AI.h:229
TBlock_Input_Connector object_f32_Software_Overcurrent_Level
Software defined overcurrent level.
Definition: P005_03_V2_0_AI.h:192
TBlock_Output_Connector object_bool_Software_Overcurrent
Software overcurrent limit.
Definition: P005_03_V2_0_AI.h:232
I16 i16_Analog_Input_Data_1
Analog input channel 1 block output as I16.
Definition: P005_03_V2_0_AI.h:202
TBlock_Output_Connector object_f32_Analog_Input_Data_3
Analog input channel 3 block output.
Definition: P005_03_V2_0_AI.h:217
volatile TP005_03_V2_0_AI_Registers * struct_Registers
Hardware mapped registers.
Definition: P005_03_V2_0_AI.h:271
TBlock_Output_Connector object_f32_Analog_Input_Data_DC
Analog input channels DC offset.
Definition: P005_03_V2_0_AI.h:220
TBlock_Output_Connector object_f32_Analog_Input_Data_2
Analog input channel 2 block output.
Definition: P005_03_V2_0_AI.h:214
TBlock_Input_Connector object_f32_Analog_Input_Full_Scale_1
Analog input channel 1 fill scale value. Also used for channel total gain adjustment.
Definition: P005_03_V2_0_AI.h:167
Definition: Protocol_Base.h:57
Definition: P005_03_V2_0_AI.h:83
U16 u16_Reserve_0x04
0x04 : Reserved
Definition: P005_03_V2_0_AI.h:90
I16 i16_Analog_Input_Filtered_Data_3
0x07 : Analog input channel 3 filtered data register as I16 value
Definition: P005_03_V2_0_AI.h:93
I16 i16_Analog_Input_Filtered_Data_2
0x06 : Analog input channel 2 filtered data register as I16 value
Definition: P005_03_V2_0_AI.h:92
I16 i16_Analog_Input_Data_3
0x03 : Analog input channel 3 data register as I16 value
Definition: P005_03_V2_0_AI.h:89
U16 u16_Analog_Input_Status
0x00 : Status register
Definition: P005_03_V2_0_AI.h:86
I16 i16_Analog_Input_Filtered_Data_1
0x05 : Analog input channel 1 filtered data register as I16 value
Definition: P005_03_V2_0_AI.h:91
I16 i16_Analog_Input_Data_1
0x01 : Analog input channel 1 data register as I16 value
Definition: P005_03_V2_0_AI.h:87
I16 i16_Analog_Input_Data_2
0x02 : Analog input channel 2 data register as I16 value
Definition: P005_03_V2_0_AI.h:88
Register structure for generic access.
Definition: P005_03_V2_0_AI.h:307
U16 u16_Analog_Input_Status
0x02 : Status register
Definition: P005_03_V2_0_AI.h:319
I16 i16_Analog_Input_Data_2
0x04 : Analog input channel 2 data register as I16 value
Definition: P005_03_V2_0_AI.h:330
I16 i16_Analog_Input_Data_1
0x03 : Analog input channel 1 data register as I16 value
Definition: P005_03_V2_0_AI.h:327
I16 i16_Analog_Input_Data_3
0x05 : Analog input channel 3 data register as I16 value
Definition: P005_03_V2_0_AI.h:333
U16 u16_Unit_ID_H
0x01 : Unit identification H read register
Definition: P005_03_V2_0_AI.h:313
U16 u16_Unit_ID_L
0x00 : Unit identification L read register
Definition: P005_03_V2_0_AI.h:310
U16 u16_Analog_Input_Control
0x02 : Control register
Definition: P005_03_V2_0_AI.h:322
Register structure for generic access.
Definition: P005_03_V2_0_AI.h:525
I16 i16_Analog_Input_Data_1
0x03 : Analog input channel 1 data register as I16 value
Definition: P005_03_V2_0_AI.h:545
U16 u16_Analog_Input_Control
0x02 : Control register
Definition: P005_03_V2_0_AI.h:540
U16 u16_Unit_ID_L
0x00 : Unit identification L read register
Definition: P005_03_V2_0_AI.h:528
U16 u16_Analog_Input_Status
0x02 : Status register
Definition: P005_03_V2_0_AI.h:537
I16 i16_Analog_Input_Data_3
0x05 : Analog input channel 3 data register as I16 value
Definition: P005_03_V2_0_AI.h:551
I16 i16_Analog_Input_Data_2
0x04 : Analog input channel 2 data register as I16 value
Definition: P005_03_V2_0_AI.h:548
U16 u16_Unit_ID_H
0x01 : Unit identification H read register
Definition: P005_03_V2_0_AI.h:531
Register structure for generic access.
Definition: P005_03_V2_0_AI.h:741
U16 u16_Unit_ID_L
0x00 : Unit identification L read register
Definition: P005_03_V2_0_AI.h:744
I16 i16_Analog_Input_Data_2
0x04 : Analog input channel 2 data register as I16 value
Definition: P005_03_V2_0_AI.h:764
U16 u16_Analog_Input_Status
0x02 : Status register
Definition: P005_03_V2_0_AI.h:753
U16 u16_Analog_Input_Control
0x02 : Control register
Definition: P005_03_V2_0_AI.h:756
I16 i16_Analog_Input_Data_3
0x05 : Analog input channel 3 data register as I16 value
Definition: P005_03_V2_0_AI.h:767
U16 u16_Unit_ID_H
0x01 : Unit identification H read register
Definition: P005_03_V2_0_AI.h:747
I16 i16_Analog_Input_Data_1
0x03 : Analog input channel 1 data register as I16 value
Definition: P005_03_V2_0_AI.h:761
U16 u16_CMP_P_1_Status
Definition: P005_03_V2_0_AI.h:258
U16 u16_Status
Definition: P005_03_V2_0_AI.h:248
U16 u16_CMP_P_2_Status
Definition: P005_03_V2_0_AI.h:260
U16 u16_CMP_N_2_Status
Definition: P005_03_V2_0_AI.h:261
U16 u16_CMP_P_3_Status
Definition: P005_03_V2_0_AI.h:262
U16 u16_CMP_N_1_Status
Definition: P005_03_V2_0_AI.h:259
U16 u16_ADC_Hardware_Fault_3
Definition: P005_03_V2_0_AI.h:253
U16 u16_ADC_Hardware_Fault_1
Definition: P005_03_V2_0_AI.h:251
U16 u16_CMP_N_3_Status
Definition: P005_03_V2_0_AI.h:263
U16 u16_ADC_Hardware_Fault_2
Definition: P005_03_V2_0_AI.h:252
Definition: P005_03_V2_0_AI.h:463
U16 u16_CMP_N_3_Status
Definition: P005_03_V2_0_AI.h:479
U16 u16_CMP_P_3_Status
Definition: P005_03_V2_0_AI.h:478
U16 u16_CMP_N_1_Status
Definition: P005_03_V2_0_AI.h:475
U16 u16_CMP_P_1_Status
Definition: P005_03_V2_0_AI.h:474
U16 u16_CMP_N_2_Status
Definition: P005_03_V2_0_AI.h:477
U16 u16_CMP_P_2_Status
Definition: P005_03_V2_0_AI.h:476
U16 u16_Status
Definition: P005_03_V2_0_AI.h:464
Definition: P005_03_V2_0_AI.h:681
U16 u16_Status
Definition: P005_03_V2_0_AI.h:682
U16 u16_CMP_P_2_Status
Definition: P005_03_V2_0_AI.h:694
U16 u16_CMP_N_1_Status
Definition: P005_03_V2_0_AI.h:693
U16 u16_CMP_P_1_Status
Definition: P005_03_V2_0_AI.h:692
U16 u16_CMP_P_3_Status
Definition: P005_03_V2_0_AI.h:696
U16 u16_CMP_N_3_Status
Definition: P005_03_V2_0_AI.h:697
U16 u16_CMP_N_2_Status
Definition: P005_03_V2_0_AI.h:695
Definition: P005_03_V2_0_AI.h:897
U16 u16_Status
Definition: P005_03_V2_0_AI.h:898
U16 u16_CMP_P_3_Status
Definition: P005_03_V2_0_AI.h:912
U16 u16_CMP_P_2_Status
Definition: P005_03_V2_0_AI.h:910
U16 u16_CMP_N_1_Status
Definition: P005_03_V2_0_AI.h:909
U16 u16_CMP_N_3_Status
Definition: P005_03_V2_0_AI.h:913
U16 u16_CMP_P_1_Status
Definition: P005_03_V2_0_AI.h:908
U16 u16_CMP_N_2_Status
Definition: P005_03_V2_0_AI.h:911