T7 with PS12DC sets digital IO to low after reading high | LabJack
 

T7 with PS12DC sets digital IO to low after reading high

4 posts / 0 new
Last post
Wiktor
wsphillips's picture
T7 with PS12DC sets digital IO to low after reading high

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...

LabJack Support
labjack support's picture
See "Electrical Overview"

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.

 


 

Wiktor
wsphillips's picture
Thank you! All is well now :)

Thank you! All is well now :)

LabJack Support
labjack support's picture
We added a new section at the

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