inversion of a signal | LabJack
 

inversion of a signal

2 posts / 0 new
Last post
Rajaox
rajaox's picture
inversion of a signal

Hi!

I'm working on a t7 pro on a lua script that provide a digital output(FIO1).  I want to know if there is a predifined function or another method to have the opposite behavior of FIO1 on another digital output (FIO2 for example) without having to write the same command twice (MB.W(2001, 0, 0) ; MB.W(2002, 0, 1))

Thanks

 

 

 

LabJack Support
labjack support's picture
Your best alternative is with

Your best alternative is with our bitmask registers, but you will still need two commands, and using the FIO# registers is simpler. Really, the benefit of the bitmask registers would be that you are toggling the DIO concurrently. You need to set the directions such as with FIO_DIRECTION, then set the states such as with FIO_STATE:

https://labjack.com/support/datasheets/t-series/digital-io#ports