Get Channel Input State Value Of Di Module - Zmotion ZMIO310 Manual

Verticale bus expansion module
Table of Contents

Advertisement

6.4.6. Get Channel Input State Value of DI Module

Function description
Object to use
Data dictionary
Examples
ZMIO310 Vertical Bus Expansion Module User Manual V1.0
? TABLE(100)
SDO_READ (0,0,$6051,2,6,100) 'get input state of channel 1
? TABLE(100)
SDO_READ (0,0,$6051,3,6,100) 'get input state of channel 2
? TABLE(100)
SDO_READ (0,0,$6051,4,6,100) 'get input state of channel 3
? TABLE(100)
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.
Analog input module: ZMIO310-16DI.
6000h, 6010h, 6020h: 6000h + extension No. of corresponding
DI module * 10, please refer to Chapter 6.4.1 for sub-module
address assignment.
'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
'print read data of channel 0
'print read data of channel 1
'print read data of channel 2
'print read data of channel 3

Advertisement

Table of Contents
loading

Table of Contents