Groov to Modbus TCP in .NET Application

So we have existing applications involving PC-based automation using SNAP Brains and I/O. The PC program, which we wrote, communicates with the Brains using the .NET class library and handles all control.

Recently, customers have expressed interest in a mobile app that would allow them to view their process and equipment status. My thought is to use a groov connected to our program via Modbus TCP. We can include a Modbus server in our application using .NET libraries like this one (FieldTalk Modbus Master Library for .NET - Serial Line & TCP). We’ve used the libraries before and they work pretty good. By using a library, our program can write whatever data it wants, whether they be physical I/O status or internal variables.

My question is can groov communicate with our program in this manner? I seem to recall a couple of instances in which some hardware devices had trouble communicating with software libraries in this manner. Has anyone had experience doing this?

Thanks.

Short answer: Yes.

Long answer: Depends. (Obligatory XKCD).

Our SNAP Brains are ModbusTCP slaves out of the box, so groov can read and write anything that has a MMP address on them with no other software required.
Check out @mstjohn nice table of Modbus device settings table here for exactly how to set up groov to talk to our SNAP Brains ; Groov your Modbus device: settings & tips

Also, note how wonderfully her table shows the problem with having a Modbus standard… There are so many ways to interpret the data… bleh… Anyway, point is, as long as your .NET library is sort of close to one or more of these ‘standards’, groov will (should) be flexible enough to read and write the data.

While I don’t know of anyone using .NET to emulate a ModbusTCP slave for groov to talk to it, I would not be surprised if someone hasn’t done it.

Anyone?

If I’m understanding your request correctly, there’s an easier option using the new Data Store feature in groov 3.3.

Simply:

  • Set up your groov instance with a Data Store
  • Add tags to that Data Store for any data that you want to view in groov
  • Push data from your .NET application into groov using the Data Store REST API

There some information about the Data Store on the Opto 22 Blog here, but it looks like our API documentation isn’t live yet. Let me go check on that.

If you want to get started in looking at the groov DataStore API, be sure you are running groov 3.3a or better.
(Check Help -> About in groov Build).

If you are, then, from groov Build mode, click Help -> groov Public API.
That opens up a tab that will show you live examples of the API calls you can make and their response.

I didn’t know about the Data Store, that looks perfect. I don’t have a groov, is there an offline document that describes the groov API? Is it the same as the SNAP PAC REST API?

Not yet. Its pretty new, so we are still working on it.

Pull down the free version of groov Server for Windows. It will run for 2 hours with no restrictions. Just restart it to get another 2 hours as often as you like.
That should be enough to get you started. Anything you build project wise or API wise will work on any groov you buy going forward.

Thanks, I’ll do that. I appreciate the help.