PLC
9836 3521 01
247
5.3.9
Device commands
Using the device command input and outputs it is possible to control individual devices directly from the
PLC.
Outputs:
Variable
Type
Use
DEVCMD_CMD
INT
The command to send to the device pointed out by
DEVCMD_DEVNAME. See table below for supported
commands.
The command is sent to the device when DEVCMD_CMD
changes to a non zero value.
DEVCMD_DEVNAME
STRING(20)
The name of the device, as defined in the ToolsTalk
PowerMACS, to send the command to. For example, "Printer
01".
DEVCMD_CMDPARSIZE
INT
Size, in number of bytes, of additional command parameters
specified using DEVCMD_CMDPARDATA[].
Note!
Only specific commands make use of addition command
parameters.
DEVCMD_CMDPARDATA
ARRAY[1..1000]
OF BYTE
Additional command parameter data. Layout and usage
depends on the targeted device and command. See table
below for specification.
Currently only devices of type "Printer" are supported. For it the following command is available:
Mnemonic
Value
Description
1
Prints DEVCMD_CMDPARSIZE bytes of the data supplied in the
DEVCMD_CMDPARDATA area.
The data is assumed to be binary and is printed without any additional formatting.
That is, to print the string "ABC" the following decimal data should be set as
parameters:
DEVCMD_CMDPARDATA[1] := 65
DEVCMD_CMDPARDATA[2] := 66
DEVCMD_CMDPARDATA[3] := 67
and DEVCMD_CMDPARSIZE := 3.
Illegal device types as targets and/or command codes are logged using events.
Note!
Support for other device types and command codes may be added in future versions. To avoid
unexpected behavior when upgrading you should not make use of any other codes then the above
listed and zero (0).
Summary of Contents for PowerMACS 4000
Page 2: ......
Page 46: ...System Architecture 46 9836 3521 01...
Page 267: ...Tightening 9836 3521 01 267...
Page 400: ...Tightening 400 9836 3521 01...
Page 486: ...Peripheral Devices 486 9836 3521 01...
Page 622: ...Peripheral Devices 622 9836 3521 01...
Page 664: ...References 664 9836 3521 01...
Page 668: ...9836 3521 01 2010 11 Edition 10 3 0 www atlascopco com...