Detecting fast switch and value | LabJack
 

Detecting fast switch and value

2 posts / 0 new
Last post
Massimiliano
comm's picture
Detecting fast switch and value

Hi,

we are trying to campture an analog value (AIN0) value when a switch turn on (FI04). Our problem is that the mechanical switch is always off and it jumps ON for probably a millisecond (a rolling wheel activate it), so:

  • if we sample at 1 millisecond, we miss some ON switch values
  • if we use the logic input as counter, we detect the switch; but we will not register the analog value in the same moment the switch is ON

Is the U3 stream mode some way helpful? Or same mode to activate reading on switch ON?

Is a T series more suitable twith LUA script to do this task?

LabJack Support
labjack support's picture
Yes, this would be a good

Yes, this would be a good application for Lua scripting on a T-series device, but a good way to do this on the U3 is using stream mode.  Stream 2 channels (0, 193) at up to 25 kscans/second and you will not miss any pulses:

https://labjack.com/support/datasheets/u3/operation/stream-mode/digital-inputs-timers-counters