ZMIO310 Vertical Bus Expansion Module User Manual V1.0
? TABLE(100)
‘print read data of channel 0
SDO_READ (0,0,$6051,2,6,100)
‘get input state of channel 1
? TABLE(100)
‘print read data of channel 1
SDO_READ (0,0,$6051,3,6,100)
‘get input state of channel 2
? TABLE(100)
‘print read data of channel 2
SDO_READ (0,0,$6051,4,6,100)
‘get input state of channel 3
? TABLE(100)
‘print read data of channel 3
6.4.6.
Get Channel Input State Value of DI Module
Function description
This function is only used to read channel input state value of
DI module, and one of DA module has 16 channels (channel 0-
15).
Four hexadecimal numbers are converted to sixteen binary
numbers, each bit represents the input status of each channel.
Object to use
Analog input module: ZMIO310-16DI.
Data dictionary
6000h, 6010h, 6020h: 6000h + extension No. of corresponding
DI module * 10, please refer to Chapter 6.4.1 for sub-module
address assignment.
Examples
'6000h, 6010h, 6020h are DI module status dictionary
'The read data is stored in the TABLE, you need to use the
TABLE command to get the content.
SDO_READ(0,0,$6000h,1,6,100)
'get the 16 channel input status of the first DI module
? TABLE(100)
'print the channel status of the first DI module
SDO_READ(0,0,$6010h,1,6,100)
'get the 16 channel input status of the second DI module
? TABLE(100)
'print the channel status of the second DI module
SDO_READ(0,0,$6020h,1,6,100)
'get the 16 channel input status of the third DI module
? TABLE(100)
'print the channel status of the third DI module