As of May 2, 2022 the LabJack forums have been set to read-only.
If you are in need of support, please contact us via one of the methods described on our contact page.
I was hoping that sending a pulse would be possible through the LJ Control Panel or through the LJLogUD.
If this isn't possible I would do it through Python code. Is there any example code available to do this?
In sum, the experimenter should manually input a specific voltage. This should result in 1 pulse of 200ms.
With LJControlPanel you can create a frequency with a certain pulse width using a timer, but it is continuous until turned off. Using the test panel you can toggle digital I/O, but there is no timing you can set. The test panel update rate is 1 second.. LJLogUD only performs readings.
Looks like you figured it out with LabJackPython. Keep in mind that you are using 3 sets of USB command-responses which have USB delay per call. For better pulse accuracy, combine your three Feedback calls into one for only one USB command-response for the pulse. For example (based on your code):
The Waveform Generation app note describes different ways to make pulses:
https://labjack.com/support/app-notes/waveform-generation
Any of the methods supported by the U3 will work for a 200 ms pulse. I'd say the WAIT technique is the simplest, depending on your software.
What are you using for software?
I was hoping that sending a pulse would be possible through the LJ Control Panel or through the LJLogUD.
If this isn't possible I would do it through Python code. Is there any example code available to do this?
In sum, the experimenter should manually input a specific voltage. This should result in 1 pulse of 200ms.
Sorry for my previous message. I managed to send a pulse with the following code, so all good!
import u3
d = u3.U3()
d.debug = True
DAC0_VALUE = d.voltageToDACBits(2, dacNumber = 0, is16Bits = False)
d.getFeedback(u3.DAC0_8(DAC0_VALUE))
d.getFeedback(u3.WaitLong(Time = 11)) #Time = 11
DAC0_VALUE = d.voltageToDACBits(0, dacNumber = 0, is16Bits = False)
d.getFeedback(u3.DAC0_8(DAC0_VALUE))
With LJControlPanel you can create a frequency with a certain pulse width using a timer, but it is continuous until turned off. Using the test panel you can toggle digital I/O, but there is no timing you can set. The test panel update rate is 1 second.. LJLogUD only performs readings.
Looks like you figured it out with LabJackPython. Keep in mind that you are using 3 sets of USB command-responses which have USB delay per call. For better pulse accuracy, combine your three Feedback calls into one for only one USB command-response for the pulse. For example (based on your code):
import u3
d = u3.U3()
onBinary = d.voltageToDACBits(2, dacNumber=0, is16Bits=False)
offBinary = d.voltageToDACBits(0, dacNumber=0, is16Bits=False)
# WaitLong: 12 * 16384 = 196,608 us
# WaitShort: 26 * 128 = 3,328 us
# Wait Total = 199,936 us
command = [u3.DAC0_8(onBinary),
u3.WaitLong(Time=12),
u3.WaitShort(Time=26),
u3.DAC0_8(offBinary)]
d.getFeedback(command)
Also, if you can use 0 and 3.3 V logic for you pulse, you can use a digital output instead of a DAC.
Thanks, great suggestion!