Getting a hexadecimal value from IDC32


Reading through the manual, I find where a binary value can be retrieved for a standard I/O, but not a high density. What I want to do is take the current I/O state from a 32 input module (IDC-32 with break-out board), convert to a hex number, and compare against a target value to determine is I’ve got an abnormal condition. Has anyone done something similar, and if so, can you point me towards the relevant manual/document/sample code? My I/O is an EB-1.


Try using the “Get HDD Module States” command in the “High Density Digital Module” group.

If you’re not seeing those commands, in PAC Control, select File > Strategy Options, click the “Legacy” tab, then click on “Original High Density Digital commands” to enable them in your strategy.


Awesome. Got them out of Legacy and that was easy enough. My Command Reference doesn’t have the HDD commands in it. What document would contain the descriptions/usage guide?


1710, the Legacy Users’ Guide.

I’m lobbying to have those HDD commands main-streamed in both PAC Control and the manual, but in the meantime, here’s the link to that Legacy Guide:


Thanks. Found 1711 has full descriptions. Main-stream would be nice, coming from a machine tool background, I’m used to I/O’s being fed to me as hex codes


What format is the output in? The command will only accept numeric variables, so hexadecimal seems to be out. Does it convert binary to base 10?


Your numeric variables can be displayed in HEX, BIN, or the default of base 10 (decimal) by the debugger.

Do you mean a string representation in hex? If you’re getting a Hex string from somewhere, you might need to use the command, in the String category, called “Convert Hex String to Number.”


What is the default number system that the Get HDD response will be in? Hex, base ten, etc. What will the value look like that is retrieved?


The response is just a value, where each bit represents the state of the point. By default, the debugger shows values in Decimal, but you can easily switch how you view that value from Decimal to Hex to Binary (which could be handy here). But it’s still the same value.

Like I always say, it’s all just a bunch of 1s and 0s, the trick is getting them in the right order. :wink: