Arduino Modbus RTU to Ignition

Hello,
I am trying to learn Ignition for work. I thought hey lets see if I can make an Arduino using a Modbus Serial RTU library talk with Ignition.
I thought it was weird that the Modbus RTU driver is not more heavily advertised, found out that its hidden in the Serial Gateway module from a post.

I used this Arduino Modbus Library https://github.com/andresarmento/modbus-arduino
I recommend the user get QModbus or something equivalent to test that they have their Arduino sketch setup correctly.

Once you install the Serial Gateway Module in Ignition and have ability to make a Modbus RTU device.
Go make some OPC tags, just be mindful that the SlaveID that you setup in the Modbus Aruduino Sketch must Match the UnitID when you address your tag.(See the Ignition documents for Setting up UnitID addressing)

If people want sample sketch or sample tags let me know. I atleast wanted to get the concept out that you can use Existing Arduino Modbus Serial Library and over the USB cable get data into Ignition. The tricky part is not forgetting about the SlaveID must match UnitID when you address your tags in the OPC Browser.

1 Like

I for one would be interested in more detail/samples, thanks

Yeah give us an example. Any Modbus TCP/IP libs?

Found this while searching!
https://www.udemy.com/how-to-program-an-arduino-as-a-modbus-tcp-client-server/?utm_source=adwords-learn&utm_medium=udemyads&utm_campaign=NEW-AW-PROS-TECH-US-DSA-EN-ENG_.ci_.sl_ENG.vi_TECH.sd_All.la_EN.&utm_content=deal4584&utm_term=.ag_43090402494.ad_205975680648.de_c.dm_.pl_.ti_aud-299743148827:dsa-334302743449.li_9022658.pd_._&gclid=Cj0KCQiA-qDTBRD-ARIsAJ_10yK0VEnmUh0oCXtmEz3t3V2p5Mtl-jOih_YUJP_uSnvtZ_KLUffzf54aAil1EALw_wcB

I know it is a paid tutorial but it may be worth it if it works. (Arduino Modbus TCP Example)

Hi Guys,
I am going to post an Arduino sketch to a public google drive and I will export some tags from Ignition. This example is not a Modbus TCP example. What I threw together was Modbus RTU or Serial. This Arduino sketch is communicating over its USB as a Comm Port to Ignition. I just took pre-existing components and made them work together.
-Download the Serial Gateway Module from Ignition, this gives you the Modbus RTU driver
-Download this guy’s Modbus Library https://github.com/andresarmento/modbus-arduino

https://drive.google.com/drive/folders/1cknygXF_tkvBj483AHbfCSUuUWBLnsfv?usp=sharing

Here’s the link to a simple Modbus RTU sketch based on a library example. Just has 1 coil and 2 holding registers. Make sure to pay attention to the Com Port the Aruduino uses and the Serial Settings in the Sketch. You will need these settings when you set up the Device in Ignition.

Also when you go create a tag you will need the SlaveID specified in Sketch to match the UnitID in the OPC tag(its the “10.” number below
[arduino]10.C100

If someone tells me how to Export a Device Connection from Ignition I will upload that.

2 Likes

Hello @dano38291.
Thank you for the example.
I know my response is a bit out of date but could you by any chance post the configuration of the device connection to the Arduino Uno?
I tried using your example but I am unable to read the values from ignition.
This is the tag error I get:
image

I’m currently using Ignition 8.1.10 and this is my device connection:

Thanks in advance.

I connected the new Arduino PLC line (Opta & Portenta Machine Control) to ignition and create this guide.

It should be easy to follow if you have some basic knowledge on PLC and Ignition

https://forum.arduino.cc/t/arduino-plc-to-ignition-via-modbus/1188911