10-17-2017 12:25 PM
Hi,
I have problem with read value from analog input module on compactRIO. I create simple vi on FPGA. My code get value from AI1 and transfer this data via DMA channel to Host. AI1 is also write to analog output. I connect to AI1 signal from generator, this signal is sine 10Hz. But in chart on Host is very strange. I attach print screen from this chart. Could you help me with this problem? I don't know why output from analog input on compact trio is wrong.
Solved! Go to Solution.
10-17-2017 01:01 PM
What module are you using to read the signal? What sample rate are you using? Sharing code would help us a lot to help you.
10-18-2017 06:34 AM
HI, this modul is NI9215 to read the signal, but i don;t know how i can set sample rate in this module, could you tell me how i can set it?
10-18-2017 09:27 AM
@kawa1500 wrote:
but i don;t know how i can set sample rate in this module, could you tell me how i can set it?
The sample rate is being dictated by that wait in your loop.
10-18-2017 12:41 PM
Ok,
I set sample rate on 100us
10-18-2017 02:08 PM
Slightly off-topic: Use the loop-timer express VI, not the wait VI for a correct and stable loop-rate. In your current code the loop rate is not 100 µs, as the code after the wait-vi also needs some time to execute.
Regards, Jens
10-18-2017 02:24 PM
Everything looks pretty normal so far except as mentioned having a wait instead of a timer. Have you tried an oscilloscope? I'm guessing it looks a little cleaner there? Can you post your RT code? My next guess is there's a hardware problem. Are you in single ended or differential mode? Try the other? Try another channel?
Also, to rule out your code, you might want to try an example like
C:\Program Files (x86)\National Instruments\LabVIEW 20xx\examples\CompactRIO\Module Specific\NI 9215\NI 9215 Getting Started\
10-19-2017 03:36 AM
I changed wait on loop timer but this don't solve the my problem.
10-19-2017 03:43 AM
I am using the oscilloscope, i connect to oscilloscope three channel (signal from generator, signal from analog input and signal from analog output). Two last of signal are similar to chart from VI but not similar to first signal from generator. Today i try change channel on compactRIO and change mode connection to module NI9215.
In this location don't exist module NI9215 with examples, i don't know why? In this folder:
C:\Program Files (x86)\National Instruments\LabVIEW 2012\examples\CompactRIO\Module Specific\
existing list of module but not existing my module.
10-19-2017 09:46 AM
I wrote wrong information in my last reply. On oscilloscope i have connected two signal. First signal comes from generator ( and this signal is the same as input on analog input module) and second signal comes from analog output. Signal from analog output is similar to signal in LabView Chart.
I change channel and this problem still exists. Do you have more suggestion what is wrong in my program?