LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI cRIO-9030 + NI 9215 - Probleme bei Frequenzen > 1 Hz

Hallo an Alle,

 

Ich arbeite mich momentan in die Programmierung von NI-Rio Systemen ein und habe leider ein Problem beim

Einlesen von einer sinusförmigen Spannung, welche ich über einen Signalgenerator (Centrad GF265) vorgebe.

 

Testsignal: 16Hz 7Vpp

Das Signal wird auch ausgegeben, habe es mir über ein Oszilloskop zusätzlich angesehen und anschließend auf den AI0 von der NI 9215 verkabelt. (Die Karte kann +-10V differentiell messen)

 

Das Ergebnis: Wenn ich statisch eine Spannung vorgebe, funktioniert alles. Die Spannung von einer Blockbatterie wurde z.B. richtig erkannt. Wenn ich die Kontake kurzschließe werden mir 0V angezeigt, dass passt auch.

Sobald ich jedoch einen Sinus mit 10Hz vorgebe, sieht das Signal katastrophal aus und mir ist leider nicht bewusst was ich genau falsch mache.

Der Schleifentimer ist auf 32 Bit us eingestellt. Die Zeit wird mit 100us vorgegeben - das sollte einer Abtastfrequenz von 10Khz entsprechen.Diagramm.PNGFPGA Programm.PNG

 

Das Programm vom FPGA und das Ergebnis aus der Visualisierung sieht folgendermaßen aus: (Anhang)

 

Ich habe die Messkarte auch an ein DAQ Chassi angehängt und mir den Analogwert über den MAX angesehen. Hierbei stimmt alles. Auch bei höheren Frequenzen wird mir ein schöner Sinus angezeigt.

 

Gibt es bei den RIO Systemen noch irgendwelche zusätzlichen Einstellungen die man beachten muss?

 

PS: Habe die Karte am auch an einen anderen Slot angeschlossen - gleiches Problem.

 

 

 

Freue mich über eure Rückmeldungen.

Vielen Dank im Voraus!

 

LG Stefan

0 Kudos
Message 1 of 7
(1,538 Views)

Hi Stefan,

 

did you notice you are writing your message in the worldwide English NI LabVIEW forum?

(Wenn du weiterhin auf Deutsch kommunizieren willst, kann ich dir das www.labviewforum.de empfehlen…)

 

On your images:

  • We cannot run/edit/debug images with LabVIEW! Please attach real code…
  • Why is there a chart in your FPGA VI? FPGAs don't support frontpanels in LabVIEW…
  • How do you transfer the samples to your RIO host? Again: attach real code…

Are you related to this thread?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(1,525 Views)

Hallo Gerd,

 

danke für den Hinweis. Werde den Beitrag im deutschen Forum poste und den

Code dazupacken!

 

LG

0 Kudos
Message 3 of 7
(1,500 Views)

My Technical Deutsch is not the best but I see a couple things. 

You may want to add some checking to make sure that you are not underflowing your data.  The other is that it looks to free run so you could be overflowing the FIFO if the RT side can't read fast enough.  Pipelining the inputs are not a bad choice.  You can pass the array of data through the FIFO and unpack it on the RT instead of passing the data in a loop.  This also will help data transfer times.

Dpete_0-1640191187391.png

I have a few applications (where this was pulled from) that I arm a 1000 point acquisition, aquire it and store it in FPGA memory so that it isn't taking up as much FPGA fabric, then pass it to the RT on demand as a block through the FIFO.

0 Kudos
Message 4 of 7
(1,495 Views)

Hello Dpete,

 

Thanks for your suggestions and for that useful example!

 

I could solve my problem for the first time. I used a FIFO with a wrong data type (FPX instead of Double) and the algorithm to read the values from the FPGA in my realtime system was also wrong.

 

I would also have other basic questions to NI-compactRio System. Perhaps

you could answer my questions.

 

Thank you for your help!

 

With best regards 

Stefan

0 Kudos
Message 5 of 7
(1,433 Views)

Hello,

 

Can you send me your labview code please?

 

i tried your version, but i havn`t found a fifo to transfer arrays from the FPGA TO REALTIME.

 

 

With best regards

Stefan

0 Kudos
Message 6 of 7
(1,401 Views)

Hi Stefan,

 


@Stefan1312 wrote:

i havn`t found a fifo to transfer arrays from the FPGA TO REALTIME.


You define/create FIFOs within your LabVIEW project, then you can use them in the FPGA and RT code…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 7
(1,391 Views)