How Can We Help?

Print

ACE as an I/O expansion unit: Exchange table with slaves

 

Some ACE includes a serial port RS232 or/and RS485. For this operation you must have 2 ACE PLC with a free serial port.

In the Slave & Master ACE PLCs

Link each ACE by the serial port
  • RS232
    • R+ (RX) <> T- (TX)
    • T+ (RX) <> R- (TX)
    • GND <> GND
  • RS485
    • R+ <> R+
    • T- <> T-
    • GND <> GND
Multidrop network for RS232

For only 2 ACE via RS232, it is very simple : RX <> TX, TX <> RX and GND <> GND

For more than 2 ACE on RS232, it is possible ! Juste add 1 diode on each Slave TX pin

Configure the serial port as Custom type and select the right mode RS232, or RS485 for ACE-1430/1450
  • RS232/485, Custom type, 9600 bds, None parity and 1 stop bits.

For this you must return to the setup hardware on the top left hand corner of vBuilder software (Green or Blue icon).

or 

Download the subroutines for the master and slave(s) and add them to your ACE PLCs

Download:

Add them to each ACE machine by selecting one of the .viofs files Add Subbroutine

Master

Slave(s)
Number of slaves and size of the exchange table

The master subroutines allow to exchange ui16 tags with each slave.

You have to choose:

  • the number of slaves
  • the size of the ui16 exchange table.

By default, the subroutine can manage 5 slaves with 10 tags by slave (5 to read and 5 to write)

Also, remember to increase or decrease the size of the tables for each tag if necessary (see Tags in Master and Slave program)

  • ui16 must be set at 5 (length 5 = tags 0 to 4) for get 5 * ui16 in exchange table
  • DataRead and DataWritten array tags (ui8) must be set at (5 * 2 +1) = 11 for get 5 * ui16 in exchange table
    • Example: 10 ui16 in exchange table means 21 ui8 array size for DataRead and DataWritten
  • Tags RWrite* and RRead* of slave not used can be deleted

Slave ACE PLC: Write a test program

In Toolbox, add a subroutine and select the SlaveRemoteIO subroutine

How it works:

  • LocalWriteUI16[ ] is an array of ui16 tags of size 5
    • LocalWriteUI16[0] is the tag number 0 written by the master
    • LocalWriteUI16[4] is the tag number 4 written by the master
  • LocalReadUI16[ ] is an array of ui16 tags of size 5
    • LocalReadUI16[0] is the tag number 0 read by the master (send to the master)
    • LocalReadUI16[4] is the tag number 4 read by the master (send to the master)

In test program, we are going to send to the master the value receive by the master (See Copy tool) !

So, we copy the values

  • LocalWriteUI16[0] to the LocalReadUI16[0] tag
  • LocalWriteUI16[1] to the LocalReadUI16[1] tag

Master ACE PLC: Write a test program

In Toolbox, add a subroutine and select the ReadWriteToSlave subroutine

How it works:

  • RWriteUI16Slave1[ ] is an array of ui16 tags of size 5
    • RWriteUI16Slave1[0] is the tag number 0 to write in slave 1
    • RWriteUI16Slave1[4] is the tag number 4 to write in slave 1
    • RWriteUI16Slave2[0] is the tag number 0 to write in slave 2
  • RReadUI16Slave1[ ] is an array of ui16 tags of size 5
    • RReadUI16Slave1[0] is the tag number 0 to read in slave 1
    • RReadUI16Slave2[3] is the tag number 3 to read in slave 2

In test program, we are going to send some values to each slave (See Copy tool) !

So, we copy the values

  • Tag 0 of the slave 1 = 10000
  • Tag 1 of the slave 1 = 10001
  • Tag 0 of the slave 2 = 20000
  • Tag 1 of the slave 2 = 20001

And we check if the value received by the slave are the same (as the value are copied by each slave ACE)

Remarks

eACE/ACE with 2 RS232 ports (7096, 7092,..)

If you use a ACEwith 2 RS232 ports, use the A1 port.
If you wish to use A2 port (Custom in “Setup Hardware”), check and confirm by [ OK ] the popup in “Port A2 SEND” and “Port A2 RECEIVE” (See subroutine “ReadWriteToSlave”)

Warnings in my program: Yes, it is normal that you get these warnings, there are some “Copy” tools for debug mode (view values in debug mode).
You can remove them.

Copy remote outputs: Use the Copy tool in Pack mode for copy all remote output states in 1 ui16 tag
You can also use Unpack for extract all remote input states from the ui16 tag

Copy Float in 2 * UI16