WRITE_CMD_MX: Updating the Command Parameters on EIO Bus
Original instructions
Description of the function
The WRITE_CMD_MX function block can be used to send a command to an (e)X80 local rack or Ethernet RIO module through the use of command words, by performing an explicit exchange.
NOTE: The command words are specific to each specific application, and are described in the specific application manuals.
The additional parameters EN and ENO may also be configured.
FBD representation
:
LD representation
:
IL representation
Representation:
CAL WRITE_CMD_MX_Instance (ENABLE:=Enable, ABORT:=Abort, ADDR:=Address, CHANNEL:=Channel, CMD_LEN:=NumberOfCommandWords, CMD:=CommandWords, DONE=>OperationSuccessful, ACTIVE=>OperationActiv, ERROR=>FaultyOperation, STATUS=>Status)
ST representation
Representation:
WRITE_CMD_MX_Instance (ENABLE:=Enable, ABORT:=Abort, ADDR:=Address, CHANNEL:=Channel, CMD_LEN:=NumberOfCommandWords, CMD:=CommandWords, DONE=>OperationSuccessful, ACTIVE=>OperationActiv, ERROR=>FaultyOperation, STATUS=>Status);
Description of parameters
The following table describes the input parameters:
Parameter
Type
Comment
Enable
Set to 1 to enable a operation.
Abort
BOOL
Set to 1 to abort the currently active operation.
Address
ANY_ARRAY_INT
Identifies the drop which the module belongs to. Array containing the Modbus slave address, result of ADDMX function (1).
Channel
Identifies the channel to work upon. Contains the rack, slot and channel numbers as follows: ‘r.s.c’. If the channel is omitted, then the module server is addressed.
NumberOfCommandWords
Number of command registers/words to be sent.
If set to 0, all command registers will be sent.
CommandWords
Channel command words. Command words to write. A DDDT-type variable may be used.
The command register/word description is provided in each EIO device manual.
(1) To address a module in the local rack, enter 0.0.10 (CPU main server address).
The following table describes the output parameters:
Parameter
Type
Comment
OperationSuccessful
BOOL
Operation completed indication. Set to 1 when the execution of the operation is completed successfully.
OperationActiv
BOOL
Operation in progress indication. Set to 1 when the execution of the operation is in progress.
FaultyOperation
BOOL
Set to 1 if an error is detected by the function block.
Status
Code providing the detected error identification.