Set an output
RVc,v
c
which output channel (1 to 8)
v
= 0 to set the output to a logic 0 (logic 1 if O flag is set)
= 1 to set the output to a logic 1 (logic 0 if O flag is set)
Sets an output to a given logic level. This is a temporary override which is cancelled the next
time the output is pulsed or if its configuration is changed.
If the “O” configuration flag is set for an output then the output is inverted.
Read/change the encoder count
EN
Read the encoder count
EN0,c
Adjust the encoder count backwards
EN1,c
Adjust the encoder count forwards
This command returns “VL” and the encoder count. For example, the reply is “VL200” if 200
encoder counts have been received since the CC320 was turned on. The count is a 32 bit
unsigned number and wraps to 0 when it reaches 2
32
.
EN0 adjusts the encoder count backwards. It has the same effect as if the encoder moved
backwards by this distance. It works for 1-wire and 2-wire encoders.
EN1 adjusts the encoder count forwards. This has the same effect as the encoder moving
forwards, so might have an effect on outputs which use the encoder for timing. For example in
PEE mode a pulse may become due to start or stop.
For example, the commands:
EN
returns VL0
EN1,25
‘ Move forward 25 count
EN
returns VL25
EN0,10
‘ Move backwards 10
EN
returns VL15
EN0,40
‘ Move backwards 40
EN
returns VL4294967271 because the count has wrapped to 2
32
– 25.
Show the state of an input.
RIi
i
which input channel (1 to 8)
Replies “VL0” if the input is logic 0 and “VL1” if the input is on.
Show the state of an output
ROc
c
which output channel (1 to 8)
Replies “VL0” if the output is logic 0 and “VL1” if the output is on.
Simulate an Input Pulse
MPi
c
which input channel (0 to 8)
Generates a simulated pulse on an input. The input can be a physical input or the free running
timer (IP0).