High Density equivalent of GetIoUnitAsBinaryValue


We have re-implemented our embedded OPTO22 systems using high density modules. In the past, using only 4 input or output modules, we used GetIoUnitAsBinaryValue or GetIoUnitAsBinaryValue64 to determine the value of all inputs or outputs within each IO unit.

However, we are now also using SNAP-ODC-32-SRC and SNAP- IDC-32N modules and I cannot find the equivalent command to get their entire status as a single 32 or 64 bit word.

The manual states that the GetIoUnitAsBinaryValue does not work for high density modules, but there is not a reference to how to get the data for high density modules and I have not found it yet.

Anyone know?


MoveIoUnitToNumTableEx should get what you want. It reads the entire IO unit, digital and analog.


Thank you!

The manual does not reference this command if you have in the GetIoUnitAsBinaryValue or GetIoUnitAsBinaryValue64 sections, but the MoveIoUnitToNumTableEx does point you to GetIoUnitAsBinaryValue or GetIoUnitAsBinaryValue64 for low density modules.

Manual update!

Another dumb question: I do not see the size of the elements in the data table. Must be at least 2 bytes, but I don’t see it defined.


Not sure why this matters (maybe I’m misunderstanding) - but the data table you are storing the data in should be a float table - these are 32 bit floats, so 4 bytes. So for your HDD modules, they will contain either a 0.0 or a 1.0.

If you have 8 slots of HDD modules, you will need a float table size of 256 (1024 bytes). 96%+ wasted space, but that’s the way it is.


I’m sure Gray is already on it. :slight_smile:


I will investigate these manual issues and let you know when they have been corrected.
Thanks for letting us know, @Rick_Raymond!
Opto 22
Tech Writer


If you’re worried about wasted space, you can use 16 elements of a table (one per module) with this command:
GetAllHddModuleStates, which, as the help tells us: “… is a high-density digital (HDD) command. To enable HDD commands, from the PAC Control menu bar, click File > Strategy Options > Legacy tab > Original High Density Digital commands.”

Also, FYI - comms to the I/O units is via UDP (vs. TCP) in case anyone is paying THAT close of attention.


Thank you Philip.

We are looking to see the state of the 32 Point Digital Modules as a 32 bit word (to emulate the info historically provided by GetIoUnitAsBinaryValue64. Most of the space using MoveIoUnitToNumTableEx will be wasted. We will loop through to build the 32 bit words we need.

I did find a legacy command, “GetHddModuleStates(I/O Unit, Module Number, Put Result In)” that returns a 32 bit word for the module.

I have not had system time yet to experiment.

Is this command still available?

Is there a non-legacy equivalent?

Thanks again…


Awesome - GetAllHddModuleStates would probably work better for you.

Mary, I kind of recall this discussion before, but why is this a legacy command?


I lobbied to un-legacy it, but since you can still get at those, it wasn’t a high-priority item to add it into the mainstream (for exactly this type of use case). But maybe one day…