Issue with write through modbus on groov

Hello forum

So i have an issue trying to write to a generator through modbus device on groov. The part that i have to read from generator its ok so i am facing problem only with write.

To get you to the point is that i have created a modbus device and i am trying to write to a specific address (tag) with the elements below:



image

In addition i get this:

I tried to figure this with no success so if you have any idea would be helpful.

Thank you.

You have not setup your bits (ARRAY SIZE) mate.

When you setup the Tag Address set your array to 15 (in your case). When you create a gadget be sure to index the correct BIT in that array.

In the pic below you will see my array is 9 which = BIT 0 - 9

Thank you Jakes but i have made a mistake, i dont have problem to read from modbus but to write.

Sorry for the confusing, so if you have any idea how to write to modbus keep me informed.

The same principle applies. You need to write to that specific Bit.

So in your case address 8193 - you will setup TAG 16-Bit Signed Integer—> Holding Register—>Start Address: 8193
—>Array Size: 15—> READ/WRITE—>NONE

when you setup your gadget use:
19

Then setup a gadget for EACH BIT:
0 = Simulate STOP
1= SIMULATE MANUAL

eg - Where it says Array index you will insert the correlating BIT for the gadget:

Ok i think i set up all the cases correctly but i get this:

Although with read function i dont get any same error. When i try to do the same thing through pac control or node red it works perfect with the same addresses but i have this problem in groov, i cant write for some reason.

hmmm, I have not done this before myself to a WRITE only register in GROOV. If you get it working in Node Red you can just create a Datastore to write to the register in Node red via groov?

Create a datastore and in Node Red use the GROOV read node to move the data from GROOV to the register?

First off - I’m not sure the groov can write to the individual bits in an address or you need to figure out what the complete 16 bit string is. So perhaps ‘stop’ is a ‘1’ at bit 0 in the 16 bit string (0000000000000001), ‘Menu+’ is a ‘1’ at bit 7 in the 16 bit string (0000000010000000).

Also, make sure your device configuration is correct.

device_config

One other thing. I usually use a program called Modbus Poll to poke at modbus devices to figure out addressing & etc. when connecting to them with SNAP Pac or Groov. There are other programs, but that is the one I use.

1 Like

I am sure the device cofiguration its ok.

I tried a lot of ways to WRITE through GROOV but nothing. I dont know whats the problem maybe a GROOV’s bug. Is anyone that can WRITE to modbus device straight from GROOV though??

Yes I can write to a Modbus TCP device.
So let’s ask this question: IS your device Modbus TCP?

Yes it is.

Also i managed to WRITE through the program (modbus Poll) nickvnlr suggested to me but not with GROOV. I get always the same error. I tried many ways but nothing. Its a bit weird that i can WRITE with many different programs but not with GROOV.

If you can share how you set up all the thing it would be really helpful.

please send specs and/or details of the device you are trying to write to

The device we are trying to write is a power generator with an embedded controller. It has a TCP/Modbus listen port configured at 502 and an address mapping as shown in the first image.
We have have been reading data from other read addresses but the only problem seems to be the write function.
We also have written through node-RED, modbus Poll in the same address.
So i set up the whole thing in GROOV trying to send the right value from a command button or a text box to WRITE to a specific address i get these errors above.

Why don’t you just use Node Red then to write to the unit via creating a Datastore in GROOV as I suggested above.

I have about 200 generators to manage at the same time so i think that node Red wont be able to afford so many controllers based on how node RED works. With node Red and 200 devices i think i will lose on the response time.

The screenshot I posted is not necessarily the correct setup. That is just what my setup is. Maybe try checking the base-one addressing. You should be able to duplicate the addressing you are successfully using in Modbus Poll. It’s just a matter of finding the right combination. Perhaps post the Modbus Poll settings that are working, including the addressing.

Can you post a screenshot of the modbus poll read/write definition window on how you successfully wrote to that register for us to see?

1 Like

Just wrote to the generator with modbusPoll and the controller responsed well.

Take a look at the screenshots:

image

Your device access config should be set the same way that nickvnlr has his above - the “Use base-one (sic) addressing” should be unchecked. Then setup your tag as 16 bit unsigned address, holding register with start address as 8193, array size blank, access read/write. Groov will put a 40 in front of your address when you save it - that is just a dumb way to let you know it is a holding register.

I’ve noticed I have to restart groov after changing the one based addressing setting.


image
image image image

Nothing yet with this setup. I want to mention that in GenCommand button i tried with 16 bit string(0000000000000001) with no results as also with text box but i get the same error.