Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

5V trigger every other second

How can I send a +5v trigger pulse for one second, then break for one second, then send another +5v trigger, etc?

 

My biggest problem is having the 1 second pause between pulses. The pause is to allow a peripheral nerve enough time to recover from stimulation. I apologize if this is a very basic question, I am quite new to this programming environment, or any programming environment for that matter.

 

Thanks for your help.

 

-OG

0 Kudos
Message 1 of 5
(3,239 Views)

Hello OG,

 

I  think you just require a continuous pulse train of frequency 0.5Hz with a duty cycle of 0.5?

 

This can be found in the example finder. In the example finder navigate to: Hardware Input and Output --> DAQmx --> Generating Digital Pulses --> Gen Dig Pulse Train-Continuous.

 

The output voltage would depend on your output device but I would assume this to be 5V generally. (Usual TTL signal)

 

This assumes you plan to use an NI DAQ device to do this and labVIEW?

 

Hope this helps and let me know how you get on.

Nick
0 Kudos
Message 2 of 5
(3,230 Views)

If the timing doesn't need to be exact (and it probably doesn't in your application) you can just use a while loop with a "wait ms" timer functions inside to force a loop time for your digital output trigger.  This will be a separate loop from your data acquisition loop that is acquiring the actual trigger/stimulus and response.  The stimulus timing loop won't be super accurate since it is software timed and the Windows environmnet can introduce jitter (on the order of a several milliseconds), but if you are recording the stimulus trigger along with the response then you probably don't care since you will then have very accurate timing of the actual stimulus/response event itself.

0 Kudos
Message 3 of 5
(3,219 Views)

Thanks for your helpful input.

 

I should first say that I am a novice user. My goal was to use SignalExpress along with the USB-6008 to output a simple +5V square wave of 50-100 Hz in order to control the frequency of 2 external current generator deivces. The external generator itself controls the amplitude of the delivered stimulus, so the purpose of the square wave signal from SignalExpress is simply needed to serve as a kind of on/off switch for the external generators.

 

I first used the "create analog signal" step to create the desired waveform (100 Hz, 2.5V amplitude, +2.5V offset), then used the "generate analog output - voltage" to hopefully configure the output. However, I get an error (200077 - SampTimingType) stating I cannot use the "continuous" function for generating the signal. I tried selecting the 1 Sample (on demand) option, but this results in a different error (missing inputs).

 

My second problem is related to digital input. I have a force gauge that uses RS232 output for its force measurements. I soldered the data output pin from the RS232 port and connected to one of the digital I/O terminals on the USB-6008. Using the "acquire digital line input" step, selected the "continuous" timing setting, hoping this would give me a continuous log of the force gauge output which I could then import into excel.

 

I apologize for my ignorance with DAQ devices, but any and all help is sincerely appreciated.

 

-OtoGuy

0 Kudos
Message 4 of 5
(3,198 Views)

I haven't worked with SignalExpress at all, but I would check first that your I/O device appears in NI MAX (Measurement & Automation Explorer) and use the test panels for the device to check that the I/O is working properly before you go much further.

 

You cannot read the RS-232 data from the force gauge using a USB-6008 digital input.  The data is encoded into a stream of 1's and 0's coming from the sensor that need to be decoded using hardware and software designed to identify the beginning of each data packet and then decode the actual data.  LabVIEW has serial "read" and "write" functions that are meant for this purpose, but you must connect your device to a RS-232 port on the computer.

0 Kudos
Message 5 of 5
(3,189 Views)