LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform generation

I am trying to generate two analog waveforms with a PCI6229 DAQ. The waveforms do not require synchronization as they are independently controlled via the front panel. The engine speed signal works just fine, it's the vehicle speed signal that is giving me fits. The signal only appears to be functioning for specific periods of time then it shuts off and restarts again, repeating this cycle. I'm thinking that is has to do with the timing of the signal within the DAQ device, however I cannot figure out how to share a clock signal that does not use the same waveform. In addition the output frequency from the DAQ card is several time higher than what is being requested at the function generator.

 

Can anyone offer some suggestions, I have search this forum and the example code in LV but can't find a solution for this particular problem.

 

Thanks,

Dave

 

 

 

 

Download All
0 Kudos
Message 1 of 8
(2,745 Views)

 


however I cannot figure out how to share a clock signal that does not use the same waveform.

 

 


Inorder to share the same clock between two tasks kindly look at the picture i have attached.  The ao/sampleclock can be shared across any number of tasks and hence will solve your problem.

 

Post back for any queries.

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
0 Kudos
Message 2 of 8
(2,718 Views)

JK

 

Thanks for your input, I wired a timing node into the both signals but could only get one or the other to operate at a time. By putting the timing node on the vehicle speed sensor only, I can get a signal at both outputs but the vehicle speed signal is nowhere near the requested frequency, it is many times higher. To me this looks like a timing issue, just not sure how to correct it. I located this document, but it appears it is only for signal express.

 

http://zone.ni.com/reference/en-XX/help/371268J-01/expresswb/master_timebase_sharing/

 

Thanks,

 

Dave

0 Kudos
Message 3 of 8
(2,694 Views)
You have a major flaw in your program. You cannot have two separate tasks for the same hardware resource. Use a single task that uses both channels. If you have bothered to connect an error indicator, you would have gotten the error code and could have looked it up.
0 Kudos
Message 4 of 8
(2,684 Views)

Hi,

You have 6229 hardware and it is capable of sharing clocks within it.  You can generate a clock using one of the counters and use that line as the master clock for all the tasks you create.  This works fine and i have tried in my application too.

Post back for queries.

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
0 Kudos
Message 5 of 8
(2,634 Views)
Thanks JK, I will give this a try later this week when I am back in the office.
0 Kudos
Message 6 of 8
(2,605 Views)

JK,

 

I have located the source default for Dev/ctr0, which is PFI 8, but what I don't understand is how to route a signal to this terminal from within the device. I have been searching help and example finder but can't seem to locate how to wire this in the VI. I am continuing my search but can you point me in the right direction?

 

Thanks,

Dave

0 Kudos
Message 7 of 8
(2,552 Views)

Dave,

 

I would recommend using the DAQmx Connect Terminals which can be found on the NI-DAQmx Palette >> Advance >> Signal Routing. This will allow you to connect different terminal in the card to one another. Make sure to also use the DAQmx Disconnect Terminals VI at the end of your program because the terminals will not be disconnected automatically and can cause a headache later if you forgot you connected the terminals. Hope this helps. 

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 8 of 8
(2,514 Views)