Programming – CUE relayCUE-8 User Manual

Page 16

Advertising
background image

5. Programming

When programming, you can proceed as in any other serial controller including drag and drop
operations.

The available command are:

Sub RelayOutputClose (Channel as Byte)

This command closes the relay. The parameter Channel – in range 1..8 means relay number.

Sub RelayOutputOpen (Channel as Byte)

This command opens the relay. The parameter Channel – in range 1..8 means relay number.

Sub RelayOutputToggle (Channel as Byte)

This command toggles the relay. The parameter Channel – in range 1..8 means relay number.

Sub RelayOutputPulse(Channel as Byte , Optional PulseTime As Time=:.4)

This command closes the relay for time PulseTime then the relay is opened.
The parameter Channel – in range 1..8 means relay number.
Pulse Time 0.1 – 999.9 sec.

Function RelayState (Channel as Byte) As Boolean

This function reads the actual state of relay. The state TRUE means relay is closed.
The parameter Channel – in range 1..8 means relay number.

Function InputState (Channel as Byte) As Boolean

This function reads the actual state of input. The state TRUE means input contacts closed.
The parameter Channel – in range 1..8 means input number.

Sub IOState (ByRef InputStatus as String, ByRef RelayStatus as String)

Reads all relay and inputs states “in one shot”and returns the values in Status strings.
Status strings (InputStatus and OutputStatus, 8bytes): N1 N2 N3 N4 N5 N6 N7 N8
The Nx means the status of channel x and the values are:

FF (hexadecimal) - when channel (input or relay) is closed

00 (hexadecimal) - when channel (input or relay) is opened

User Manual relayCUE-8

www.cuesystem.com

Page 16 of 24

Advertising