Vicking electronics
Pag. 22
Read level input lines directly
126
(dec)
+ N
N = 48 (Ascii ‘0’) to read the level on input 1.
N = 50 (Ascii ‘2’) to read the level on input 2.
N = 51 (Ascii ‘3’) to read the level on input 3.
N = 52 (Ascii ‘4’) to read the level on input 4.
After the WORKmate receives this command, it will respond immediately with 0 or 1 for the data and no
function code. When current flows through the input line the data 48(Ascii ‘0’) is transmitted, otherwise
49(Ascii ‘1’) will be transmitted.
Current flows through the input when
§
The switch is closed in switch mode.
§
A voltage is applied in voltage mode.
ONLINE example
Transmit: 126 48
Read the status of input port 1.
OFFLINE direct example
CHAIN $GETIN1%126%48
PRINT $ADRES,$GETIN1 : SEND
OFFLINE parameter example
Is not possible with parameters
The counter commands
Both inputs on the Input/Output board have counters associated with them; these count the pulses that arrive
on the inputs in different ways.
Up counter 1
Counts each pulse on input 1.
The timeout counter is reloaded with the ‘timeout value’
during every pulse.
Up counter 1 timeout value
If the next pulse on input 1 doesn’t arrive during this time a
function code is send by the WORKmate.
Down counter 1
Counts down till zero and then next pulse the WORKmate
will sends a function code and down counter 1 is set to the
reload value.
Counters
for input 1
Reload value down counter 1
This stores the value that down counter 1 restart at when
going past zero.
Up counter 2
Counts each pulse on input 2.
Down counter 2
Counts down till zero and then next pulse the WORKmate
will sends a function code and down counter 2 is set to the
reload value.
Counters
for input 2
Reload value down counter 2
This stores the value that down counter 2 restart at when
going past zero.