Modbus Driver - Bit Level Writes to Registers

Would it be possible to add bit level writing to Register Memory? I believe the Modbus function call 22 would easily support this feature. We are looking at a “forklift” upgrade of an HMI package that has this capability in it today.

Adding this would allow for a very clean exchange of the existing HMI with Ignition. I think this enhancement would make the driver more flexible for others as well. In our case, it would keep us from having to modify the PLC code already existing in many PLC systems.

You can already achieve this with a relatively simple scripting call, essentially doing the same thing the function code 22 does.

See this post for an example of the script.

You could expand further on that to provide function parameters for your own AND and OR masks if you’d prefer.

When tags are defined in the system as boolean and then reference a given bit in PLC, the system provides for easy status reading of these bits. I’m not sure I follow the logic for keeping the ability to write the bits in a register out of the driver.

Competitor products (three of them) have register bit level read/write capability built into their driver. If I was trying to create a work around for a few points, I would agree this scripting is a possible work around. I think scripting for each “bit” level write is adding unnecessary overhead to the system.

How would you suggest keeping a corelation between a tag to read the bit (boolean)and the tag holding the bit to write (int4)?

I really think this functionality belongs in the driver. At least it would be much more intuitive to have it there. The tag would be entered into the system and reference the memory space where it resides in the PLC. You then read and write you boolean tag.

When porting an existing HMI/PLC system to Ignition, working with exporting and importing tags from an existing system to Ignition. It would be so much more straight forward to define the boolean tags and import them to ignition and use them to read from AND write to.

I would love to understand the technical issue for adding this to the Modbus Driver and why the bushback when other products are doing this already.

Thinking out loud … can you use the scripts Kevin provided within a SQLTag’s expression? If so, it’d allow you to create one tag per bit …

Ok I’m looking into this further… stand by :slight_smile:

Ok this has officially been added as a feature request. I can’t promise a date for completion though.

Any Idea on when this will be added yet since it missed this last release?

It should appear in the 7.2 timeframe.

Do you have a new estimate now on when this will be rolled out?

We would be also interested in hearing if there is a firm date for the implementation of this functionality.

It’s coming, I can’t promise any dates but I’m hoping that by April it will be done.

Now that we are ver close to April, can you give us an update on when this will be delivered?

:smiley:

[quote=“bolewski”]Would it be possible to add bit level writing to Register Memory? I believe the Modbus function call 22 would easily support this feature. We are looking at a “forklift” upgrade of an HMI package that has this capability in it today.

Adding this would allow for a very clean exchange of the existing HMI with Ignition. I think this enhancement would make the driver more flexible for others as well. In our case, it would keep us from having to modify the PLC code already existing in many PLC systems.[/quote]

Still hoping to have something in beta by the end of the first week in April :slight_smile:

Just adding my voice to the chorus – this is a feature that we would find very useful.

Thanks!

So… an update.

Modbus Driver v2 will be released with 7.2.6. It’s a new Modbus driver; it can run side-by-side with the old Modbus driver.

It’s 95% backwards compatible. You can export your old address configuration and import it into this one using the same interface. The only difference is that some addresses/item paths may be slightly different, so you may have to drag the new tags in and point things towards them again.

It supports bit-level writes.

It’s open source. :smiley:

When your need for the new features exceeds the pain of dealing with any incompatibilities between the two drivers you can start to switch over to v2.

Hi Kevin,

Can you give more information (or changelog) for this new driver ? and when you say it’s open, that means that you’ll provide (upon request) the source code for the Ignition SDK ?

Regards,

[quote=“gnguyen”]Hi Kevin,

Can you give more information (or changelog) for this new driver ? and when you say it’s open, that means that you’ll provide (upon request) the source code for the Ignition SDK ?

Regards,[/quote]

A rough change log would be:

  • Support for bit-level writes
  • Option to enable/disable gap spanning in the request optimizer
  • Option to enable/disable WriteMultiple* requests
  • More efficient use of available Modbus function calls
  • Open source

The Ignition SDK is not open source, but the source code for the Modbus driver (which is built against the Ignition SDK) will be freely available.

Nice to read.

We are at 7.2.6 beta 11 now.

Any idea when it’s going to come out of beta?

Inquiring minds want to know.

Thanks,

Dennis

Today :slight_smile: