Function
Retrieves the signal of event controller.
Format
Ret = AioGetEcuSignal ( Id , Destination , Source )
Parameters
Id
[ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the ID retrieved from AioInit.
Destination
[ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the destination signal from the following range.
Destination signal |
Macro |
Value |
Analog input sampling clock period |
AIOECU_DEST_AI_CLK |
4 |
Analog input conversion start signal |
AIOECU_DEST_AI_START |
0 |
Analog input conversion stop signal |
AIOECU_DEST_AI_STOP |
2 |
Analog output generating clock period |
AIOECU_DEST_AO_CLK |
36 |
Analog output conversion start signal |
AIOECU_DEST_AO_START |
32 |
Analog output conversion stop signal |
AIOECU_DEST_AO_STOP |
34 |
Counter0 UP clock signal |
AIOECU_DEST_CNT0_UPCLK |
134 |
Counter1 UP clock signal |
AIOECU_DEST_CNT1_UPCLK |
135 |
Counter0, Timer0 operation start signal |
AIOECU_DEST_CNT0_START |
128 |
Counter1, Timer1 operation start signal |
AIOECU_DEST_CNT1_START |
129 |
Counter0, Timer0 operation stop signal |
AIOECU_DEST_CNT0_STOP |
130 |
Counter1, Timer1 operation stop signal |
AIOECU_DEST_CNT1_STOP |
131 |
Synchronous bus master signal1 |
AIOECU_DEST_MASTER1 |
104 |
Synchronous bus master signal2 |
AIOECU_DEST_MASTER2 |
105 |
Synchronous bus master signal3 |
AIOECU_DEST_MASTER3 |
106 |
Source
[ C, C++ : short * ] [ Python : ctypes.POINTER(ctypes.c_short) ]
Specifies the address of the variable that stores the source signal.
One of the following values is stored to Source.
Source signal |
Macro |
Value |
Not connected |
AIOECU_SRC_OPEN |
0 |
Analog input internal clock signal |
AIOECU_SRC_AI_CLK |
4 |
Analog input external clock signal |
AIOECU_SRC_AI_EXTCLK |
146 |
Analog input external trigger start signal |
AIOECU_SRC_AI_TRGSTART |
144 |
Analog input level trigger start signal |
AIOECU_SRC_AI_LVSTART |
28 |
Analog input conversion times stop signal (Not delay) |
AIOECU_SRC_AI_STOP |
17 |
Analog input conversion times stop signal (Delay) |
AIOECU_SRC_AI_STOP_DELAY |
18 |
Analog input level trigger stop signal |
AIOECU_SRC_AI_LVSTOP |
29 |
Analog input external trigger stop signal |
AIOECU_SRC_AI_TRGSTOP |
145 |
Analog output internal clock signal |
AIOECU_SRC_AO_CLK |
66 |
Analog output external clock signal |
AIOECU_SRC_AO_EXTCLK |
149 |
Analog output external trigger start signal |
AIOECU_SRC_AO_TRGSTART |
147 |
Analog output specified times output stop signal (Use FIFO) |
AIOECU_SRC_AO_STOP_FIFO |
352 |
Analog output specified times output stop signal (Use RING) |
AIOECU_SRC_AO_STOP_RING |
80 |
Analog output external trigger stop signal |
AIOECU_SRC_AO_TRGSTOP |
148 |
Counter0 UP clock signal |
AIOECU_SRC_CNT0_UPCLK |
150 |
Counter1 UP clock signal |
AIOECU_SRC_CNT1_UPCLK |
152 |
Counter0 comparison count match |
AIOECU_SRC_CNT0_CMP |
288 |
Counter1 comparison count match |
AIOECU_SRC_CNT1_CMP |
289 |
Synchronous bus slave signal1 |
AIOECU_SRC_SLAVE1 |
136 |
Synchronous bus slave signal2 |
AIOECU_SRC_SLAVE2 |
137 |
Synchronous bus slave signal3 |
AIOECU_SRC_SLAVE3 |
138 |
Ai, Ao, Cnt, Tm software start signal |
AIOECU_SRC_START |
384 |
Ai, Ao, Cnt, Tm software stop signal |
AIOECU_SRC_STOP |
385 |
Return values
Ret [ C, C++ : long ] [ Python : ctypes.c_long ]
Return values |
Content |
0 |
Normality completion |
7 |
Execute AioResetDevice function because the device has recovered from standby mode |
10001 |
Invalid
Id was specified |
10002 |
AIO
driver can't be called |
17010 |
The value of Input is outside the designated range of the function |
17011 |
Pointer
to Source is NULL |
20001 |
This function can't be used by this device |
20002 |
Can
not use while by another device works |
20003 |
Can
not use because another process is using the device |
27010 |
The value of Destination is outside the designated range of the device being used |
Remarks
If the device is in operation, the function cannot be performed.
Example
The Source signal connected with the analog output generating clock period is acquired.
C, C++ |
long
Ret; |
Python |
Ret
= ctypes.c_long() |