Title says it. Toggle devices works with the PS12DC however...
After setting a digital IO channel to 1 (high) calling a subsequent read on the same channel returns 1 (correctly) but then immediately reverts the channel to 0 (low). Thus "checking" the status of a powered device connected PS12DC will inadvertently turn it off if it had been switched on.
Is this intended behavior? And ideas what may be wrong? My only solution at the moment is to dedicate a boolean value in my code that tracks the status of the channel so reading isn't necessary...
See "Electrical Overview" here:
https://labjack.com/support/datasheets/t-series/digital-io
Some reads change the direction of the digital I/O to input. The PS12DC Datasheet says "Input" is ambiguous and not recommended:
https://labjack.com/support/datasheets/accessories/ps12dc/appendix-d
Look at the descriptions of the different registers:
https://labjack.com/support/datasheets/t-series/digital-io
https://labjack.com/support/software/api/modbus/modbus-map
Read one of the _STATE registers to do an input read without changing direction.
Thank you! All is well now :)
We added a new section at the bottom here called "Reading the State of an Output":
https://labjack.com/support/datasheets/t-series/digital-io