12-29-2009 09:09 AM
I have a cRIO 9073, Labview 2009 and a Ni 9401 DIO module. I don't have the Labview FPGA option and therefore using the scan engine. I need to ouput a fixed number of digital pulses at 350 hz and have access to at least 2 other digital lines.
If I try generate the pulses using a loop and writing to the port, the highest rate that I can get is 50hz.
If I try to use PWM (under scan engine Speciality Digital Configuration), then all of the lines in the port get changed to PWM mode and are unavailable for other functions. I thought that I might be able to send a pulse train using the PWM and count the number of pulse with a counter on the same module or configure the PWM to stop at a predefined count.
Q1. Should I be able to generate faster rates (>50 Hz) by toggle the data line? (i.e. Am I doing something wrong in Labview?)
Q2. If I purchased the LV FPGA option, would I be able to independently configure each line of the digital IO port? (e.g. Dio0 as PWM out, Dio1 counter input, Dio2 as digital in or out).
Thanks for any help you can give.
12-29-2009 09:49 AM
Hello dav383838,
To answer your questions.
1. Yes, you should be able to go faster than 50hz. I suspect you are still using the default scan period of 10 ms. Right click on the CompactRIO in the project and select properties. You should be able to change the scan period to 1 ms under the Scan Engine category. Be sure to put your IO code in a timed loop that is synchronized to the scan engine. This should be sufficient to generate pulses at 350hz.
2. FPGA gives you lower level (and much faster) access to the module's IO. You aren't able to configure a line as a PWM output, but you would be able to implement your own PWM output scheme. I believe the 9401 direction is set in 4 line chunks, but yes, you would be able to do something different with each line, as opposed to specialty digital where the whole module is configured in one way.
Let me know if you have any other questions,
Sebastian