Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

RT vi and FPGA vi on cRIO

Hello All,

 

I have a couple basic questions I just cannot find the answers to.  Running Labview 2011 and the example code for motor control with the NI 9505 and a cRIO why is it that there are two vi; an RT vi and an FPGA vi?  The basic control of the motor (current measurement, pwm) seem to be accomplished on the FPGA vi, why have a second vi on the RT side of the cRIO to open a reference to the FPGA vi?  Is this just to demonstrate how a reference is opened? Also why not have a host vi in that case?  thanks.

 

 

0 Kudos
Message 1 of 6
(5,118 Views)

Hi Moparnick,

 

So the RT VI is designed to allow the module to communicate with the cRIO itself. The FPGA VI is where the commands are being set to actually control the motor, like you said. The FPGA VI needs to be referenced by the RT VI since the RT VI is the "higher level" VI. Does this clear things up a bit?

Ravi A.
National Instruments | Applications Engineer
0 Kudos
Message 2 of 6
(5,103 Views)

Hello Ravi,

 

That helps a bit, it has given me a new question.  So both VIs are controlled on the host computer (connected to cRIO over ethernet), however, am I correct in saying the host only "displays" the VIs for the user to operate?  As in the VI is running on the cRIO but the front panel gets displayed on the host computer and the only action the host computer takes is to send any changes the user makes on the front panel back to the cRIO over TCP/IP?

 

Thanks a lot.   

0 Kudos
Message 3 of 6
(5,099 Views)

So a Host VI, as that term applies, runs on the host computer, not on the cRIO itself. Let me distinguish among the three different VIs involved

 

  • If you have a Real-Time OS on your cRIO, that's when the RT VI comes into play. The RT VI is deployed to the cRIO and can communicate with the FPGA VI.
  • The Host VI is different. It is a VI that runs on the host computer when connected to the cRIO via ethernet. It can also do some setup and communication with the FPGA VI. If you want the cRIO to run without any connection to the host machine, then anything you do in the Host VI must be done elsewhere, and you will not be able to have user input (since you don't have a keyboard, mouse, etc, but rather just a cRIO).
  • The FPGA VI is deployed to the FPGA itself and runs there.
Ravi A.
National Instruments | Applications Engineer
0 Kudos
Message 4 of 6
(5,084 Views)

Hi,

I am facing one problem  to control DC motor using NI cRIO-9073.  we made FPGA VI for control the motor and RT VI to communicate with FPGA VI and for  fine control of motor using PID control tunning. Its working fine in one direction i.e is in counterclockwise while increasing achuater value(angle) and rotating clockwise while decresing achuater value. But our requirement is reverse. For that i am changing the direction in FPGA VI from  counterclockwise to clockwise for change the direction of motor in RT VI (in clockwise direction)  while increasing achuater value. Its working fine in FPGA VI but not updating in RT VI means while running RT after compilation of FPGA VI its working as same as  previous time. Its not changing the direction at all. Also When I am changing the cable connection of motor in cRIO NI 9505 module to change the direction, its changing direction but its running continuously in required direction. Its not controlling as per user control.

So please help me here to fix this problem.

0 Kudos
Message 5 of 6
(5,019 Views)

Hi

 

as they say a picture paints a thousand wordsSmiley Happy

 

However is that enough?  Have you tried the examples in  NI example finder ?

 

just search for 9505.

 

Your explanation  does not provide  detail of your project set up. Are you using shared variables? How many 9505 modules ?

 

xseadog

0 Kudos
Message 6 of 6
(4,904 Views)