LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HOW TO SEND SERIAL DATA WITH ni9401 (DO) module and the ni cDAQ9172 chassis ?

Hi,
I hope someone be able to help me.
I am a french student and I want to send serial data only with the ni9401 (DO) module and the ni cDAQ9172 chassis.
I am using LABVIEW 8.2 basis version
I would like to send serial data only on one line, 8 bits data and clock signal that i generate on an other line.
For the moment, I am using a for loop in which there is the icon "write" and outside i have put a number converted in an boolean array and i have indexed the loop with the array.  The problem is the frequency which is lmited, about 10-50Hz. I would like to increase the frequency, about 1-10kHz. 
I tryed an other mehod but the frequency is limited again.
These are the vi i am using.
If someone can help me to increase the frequency or knows an other method to send high frequency serial data on one line.
Thanks
Tonio31
Download All
0 Kudos
Message 1 of 3
(3,028 Views)

Hello,

The explication of that is described below:

The 9401 is a very fast digital input / output card capable of speeds well over 20KHz, but not if using an On-Demand task. The only way to repeatedly output On-Demand is to place the DAQmx write VI inside of a loop. The frequency of the signal will be controlled by how quickly the loop iterates, which means that the timing of the task is controlled by the delay of the loop. This can be adjusted using timing VIs, but is also affected by any other VIs in the loop, the speed of the computer, and the availability of any processor time.

Did you try to make the same test with only one loop (at the top) and to delete the loop at the bottom of the diagram and to put directly the value in ms for the timing parameter?

You can achieve much higher speeds with tremendous accuracy if you use hardware timing, which requires the sample clock VI and a Continuous or N-Sample task.

Regards.

0 Kudos
Message 2 of 3
(2,997 Views)

I am actually attempting to do the same thing with the same hardware.  I only have LabView 8.0, so I'm unable to view the original poster's vi's.  It sounds like I have used a different approach.  I eventually would like to use much higher data rates (MHz), if possible. 

 

I believe I have properly set up the clock using the DAQ Assistant.  I have verified, at lower frequencies, that the clock is outputting.  Next, I want the user to choose what data is sent from 4 different enum's.  Each enum controls 2 bits in the byte to be sent.  I was able to send out the appropriate data on command to a Digital Waveform Graph (it worked perfectly).  What I cannot figure out is how to get this data to my hardware.  I don't have much experience in this area.

 

Eventually, I would like to get away from using the DAQ hardware and just use conventional PC hardware.  Any help you could give will be greatly appreciated.

 

 

0 Kudos
Message 3 of 3
(2,780 Views)