|
<< Click to Display Table of Contents >>
[N] or [B] Parameters for PLC- or Block-Type Tags |
N1 or B1 |
Address of a PLC |
N2 or B2 |
Data format. For more information, please check tables Data types and Bits per memory unit |
N3 or B3 |
Memory address |
N4 or B4 |
Data handling mode. Possible values are 0: BCD or 1: Binary |
Use PLC Tags to perform readings or writings to a single memory position of a PLC, defined in the N3 parameter.
Use Block Tags to perform readings or writings to more than one memory position of a PLC. Each Element of this Block Tag represents a sequential memory position, always starting at the initial address specified in the B3 parameter.
Memory addresses of Koyo PLCs (V-Memory address) are in octal format, and they must be converted to the DirectNet format before referencing them in specified in the N3 or B3 parameter.
For example, when reading an address V02001 (2001 in octal), users must convert it to decimal (2001 in octal is equal to 1025 in decimal) and add 1 (one) to this value, thus getting a final value of 1026. Therefore, to read the address V02001, users must configure the N3 or B3 parameter to the value 1026.
Data format in the B2 parameter is a concatenation of values of data types with values of bits per memory units, according to the next examples:
•B2 = 13, in which 1 (one) is equal to "Data Type 31" and 3 (three) is equal to "16 bits per memory unit"
•B2 = 12, in which 1 (one) is equal to "Data Type 31" and 2 (two) is equal to "eight bits per memory unit"
•B2 = 21, in which 2 (two) is equal to "Data Type 32" and 1 (one) is equal to "one bit per memory unit"
Value |
Data Type |
|---|---|
1 |
Data Type 31 (V memory, Timer/Counter value) |
2 |
Data Type 32 (Inputs - X, GX, SP) |
3 |
Data Type 33 (Outputs - Y, C, Stage, Timer/Counter Bits) |
9 |
Data Type 39 (Diagnostic Status) |
Value |
Bits |
|---|---|
1 |
One bit |
2 |
Eight bits |
3 |
16 bits |
This Driver supports reading multiple data blocks with up to 256 bytes. Its protocol supports data transfers up to 255 data blocks. Thus, users can transfer up to 65,280 bytes (256 × 255). As one value is returned for each Block Element, there are the following modes:
•8-bit memory reading: Maximum of 65,280 Elements
•16-bit memory reading: Maximum of 32,640 Elements
•8-bit memory reading: Maximum of 32,640 Elements
•16-bit memory reading: Maximum of 16,320 Elements
This Driver's protocol is transmitted serially, byte by byte in hexadecimal format, but this Driver can interpret this data as a value in BCD mode (with the N4 parameter equal to zero) or as a value in Binary mode (the N4 parameter equal to one).
For example, suppose a value 22h, in hexadecimal, is received. If this value is handled in BCD mode, this Driver returns the value 22 in decimal. If this value is handled in Binary mode, this Driver returns the value 34 in decimal.
This Driver uses that data handling mechanism both for reading and for writing.