AB-PLC5 communication driver

 

AB-PLC5 Communication Driver is the driver to communicate with  AB PLC5 of Rockwell Automation in U.S.A.

 

Note) Refer to AB-SLC Serial communication driver.

 

 1. Read settings

 

<Figure 1> is read setting example of AB-PLC5 communication driver.   

<Figure 1> Read setting example of AB-PLC5 communication driver

 Device part of  <Figure 1> input Com Port(COM1), Baud Rate(19200), Parity Bit(0), Data Bit(8), Stop Bit(1) respectively.  

The setting of communication speed, parity bit, data bit, stop bit, ... can set 'AB PLC5 Ladder program'.

 

AB-PLC5 communication driverí»s read schedule

Read schedule setting parameters are as follows:

1) STATION – station = 0 ~ 255.

2) memory type(and file number) – memory type = B7, N7, N8, N9, N17 ...

File Number 9 ~ 255  : B, T, C, R, N, F (setting by Ladder program)

3) Read Start Address – read start address of memory.

4) Save Start Address for Communication Server – save start address.

5) Read Size – word unit size. 

 

Read schedule example)

READ, 0, N7,   0,  0,  2,

READ, 0, B3,   0,  2,  2,

READ, 0, N11,  0,  4,  2,

READ, 0, N10,  0,  6,  2,

READ, 0, N9,   0,  8, 2,

READ, 0, N8,   0,  10,  2,

READ, 0, N17,  0,  12,  2,

 

 

2. Writing settings

You can write AB PLC5 by writing settings.

 

 

Bit Write

Bit write setting parameters are as follows:

1)  PORT  :  Port no. (0 ~ 255)

2) STATION :  station = 0 ~ 255.

3) ADDRESS : Upper 3 digit = word unit writing address (10 digit), Lower 1 digit = 0 ~ F(16 digit) writing bit pos. (ex : 001A  =  1  word A bit)

4) EXTRA 1 :  memory type =B3, N7...

5) EXTRA 2 : Don't care.

 

Write example 1)

PORT:0   STATION:1   ADDRESS:0003  EXTRA1:N7  EXTRA2 :

The setting parameter shown above is an example of bit write for 0 word, 3 bit of memory N7 for AB-PLC5 connected with 0 port, 1 station.

 

 

Word Write

Word write setting parameters are as follows:

1)  PORT  :  Port no. (0 ~ 255)

2) STATION :  station = 0 ~ 255.

3) ADDRESS : word unit writing address (10 digit).

4) EXTRA 1 : memory type =N7, N10, ...

5) EXTRA 2 : setting of multi data write

1 = save the value of multi data write, (Extar1 = don't care)

2 = multi data write (saved data value), (Extra 1 = writing memory type)

3 = all data delete of saved multi data value, (Extar1 = don't care)

0, 4, ...= normal 'Word Write'.

 

Write example 1)

PORT:0   STATION:1   ADDRESS:0015   EXTRA1:N10  EXTRA2 :

The setting parameter shown above is an example of word write for 15 word of memory N10 for AB-PLC5 connected with 0 port, 1 station.

 

 

Example of multi write by script)

$AO_0000.Extra2 = 3;                                                // delete of saved multi data value

@SetTagValue("AO_0000", 0);

 

$AO_0000.Extra2 = 1;                                                // save of multi data write data

for(i = 0; i < 25; i = i + 1) {

   @sprintf($AO_0000.Extra1, "%03d", i);               // Extra1 = don't care, but, input an arbitrary value in order to the same data do not ignore

   @SetTagValue("AO_0000", 1000);                      // save of writing value, example value =1000

}

@sprintf($AO_0000.Extra1, "N7");                          // writing memory type = N7( or F8, N9 ...)

$AO_0000.Extra2 = 2;                                                // setting of multi data write

@SetTagValue("AO_0000", 1);                                // rela write command, 25 multi data write