Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

SDM-IO16 programming support


mwassmer Jan 14, 2016 07:51 PM

I am trying to program a SDM-IO16 according the following channel mapping:

  • Channels 1-11: Individually controlled relays (turned on/off via Public variables)
  • Channels 12-14: Pulse frequency measurement of cooling fans
  • Channel 15: Pulse count measurement of flowmeters
  • Channel 16: NOT USED

Does anyone know how to write some efficient code to accomplish this?


JDavis Jan 15, 2016 03:39 PM

In this case, there isn't any way around calling the SDMIO16 instruction a bunch of times.

You can address groups of 4 channels. If you shift your pulses down the channels and leave 12 free, It would simplify the relays a little bit.


iog Jan 15, 2016 05:39 PM

You need to run a setup instruction between BeginProg and Scan

SDMIO16 (Setup,Status(1),0,90,9322,2000,0000,0000,1,0)

Code 90 tells the ports what they are from the mode parameters

Then you will need an SDMIO16 instruction in the program using code 95 using variables to control the condition of the ports

3 x SDMIO16 instructions to read the frequencies of port 12,13,& 14 using codes 35, 36 & 37 respectively

and a final SDMIO16 instruction using code 15 to tally the pulses on port 15

Not terribly elegant but it should do what you want

Log in or register to post/reply in the forum.