A simple example of how to connect a few tags from your ACE PLC to Virtuino Modbus Android HMI

via the ACE-GTW-MB Modbus-TCP gateway

Virtuino Modbus

 

For this example, we use:

  • an ACE PLC (All ACE are compatible with the ACE-GTW-MB Modbus TCP Gateway)
  • a ACE-GTW-MB Modbus TCP Gateway (with its default settings)
  • the HMI on Android : Virtuino Modbus

 

We will implement on the HMI Modbus Virtuino HMI:

  • a 2-position switch
  • an indicator light
  • an analog slider
  • a digital indicator

ACE PLC

Setup a simple program in the ACE PLC with vBuilder

First, create this simple program with vBuilder:

  • InBitC1 is an existing physical input of your ACE
    • used for change the state of BitToRead
  • BitToRead is a new internal bit of your ACE
  • BitToWrite is a new internal bit of your ACE
    • used for change the state of OutBitD1
  • OutBitD1 is an existing physical output of your ACE
  • WordToWrite is a new internal UI16 word of your ACE
    • used for change the state of WordToRead
  • WordToRead is a new internal UI16 word of your ACE

For to be able to write in these tags from the Modbus master, you must make them editable. For BitToWrite and WordToWrite

Add all tags to the Modbus table

Now, you can upload your program:

  1.  Upload the program
  2.  Run the program 

Connect the ACE-GTW-MB

Connect the ACE-GTW-MB gateway to the USB port of your ACE and power on it! The ACE is powered by the gateway.

Setup a simple HMI with Virtuino Modbus

Server Settings
New Server – Gateway
Named ACE-GTW-MB
Enter the IP address
192.168.8.1 by default
New Module
(ACE)
Unit ID by default is 1
(= Modbus PLC ID#)
See Modbus table of vBuilder:
New Slider
(For WordToWrite)
Server: ACE-GTW-MB
Memory: Module Register
Address: 1
Unit ID: 1
Format: Unsigned Word 16 bits (UI16)
Function: 06
New Value Display
(For WordToRead)
Server: ACE-GTW-MB
Memory: Module Register
Address: 0
Unit ID: 1
Format: Unsigned Word 16 bits (UI16)
Function: 03

 

 

New Led
(For BitToRead)
Server: ACE-GTW-MB
Memory: Module Register
Address: 0
Unit ID: 1
Format: Not used
Function: 01
New Switch
(For BitToWrite)
Server: ACE-GTW-MB
Memory: Module Register
Address: 1
Unit ID: 1
Format: Not used
Function: 05
Connect your Android device
to the WIFI Access Point
of the ACE-GTW-MB
Connect Virtuino
Lock the panel
It’s done!
The switch does not turn on the led!

 

For another method of connecting your Android device to the gateway, see «How to connect the ACE-GTW-MB on the network«

 

 

 

 

How does this Android HMI work?

  • the state of the HMI switch (ON/OFF) change the OutBitD1 output of your ACE
  • the InBitC1 PLC input of your ACE change the led state of the HMI
  • the HMI slider change the WordToWrite tag of your ACE
  • the HMI value display the WordToRead tag of your ACE (=WordToWrite)

Nota:

  • OutBitD1 can also be modified directly (if present in the Modbus table)
  • InBit cannot be modified via the Modbus table, it is physically dependent on its input