WWW.NNC.IR
Macro Reference
709
8
Appendices
Vision System FH/FZ5 Series
User’s Manual (Z340)
SetPlcData
Creates the data that is written with the WritePlcMemory function.
Format
SetPlcData <ioIdent>, <writeData()>, <offset>, <size>, <data>
Parameter
Return value
None.
Description
Sets the amount, specified in the <size> parameter, of the data specified in the <data> parameter by using
the communication module specified in the <ioIdent> parameter. The data is set from the beginning of the
data array specified in the <writeData()> parameter, in the position offset by the amount of the value specified
in the <offset> parameter.
After creating data with this macro function, execute the WritePlcMemory function to write the data to the PLC
memory area.
In the <writeData()> parameter, specify the 1D integer array variable that stores the data to be written,
without adding element numbers but adding () to the variables.
In the <offset> parameter and <size> parameter, specify the offset and size in units of bytes. These units are
different from the units used in the WritePlcMemory function (units of channels).
Specify 2, 4, or 8 in the <size> parameter. These respectively set a 2-byte integer, 4-byte integer, or 8-byte
real number.
If an incorrect data type is specified for a parameter, a "Type mismatch" error will occur.
If a non-existent number, numerical value, or combination of data types or values is specified for a parameter,
an "Illegal function call" error will occur.
If the format is written incorrectly, such as writing the macro function name incorrectly, omitting a comma, or
omitting a half-width space, a "Syntax error" error will occur.
Usage Cautions
• Before using the WritePlcMemory function in PLC link communication to write data to the PLC memory
area, always use this macro function to create the data to be written. If the data is directly set in the
WritePlcMemory parameter without using this macro function, the correct data may not be set.
Parameter
name
Data type Description
<ioIdent>
Character
string type
Identification name of the communication module to be used (Reference: XList of I/O
Modules (p.341))
<writeData()> Integer array Data to write
<offset> Integer type
Offset to address from which the beginning of the data is to be written (byte units).
<size> Integer type Data size to set (byte unit)
<data>
Integer type
Double
precision real
number data
type
Character
string type
Data to set