LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

Load controller parameters to FPGA

I'd like to deliver an FPGA solution with functionality that allows the user to change the PI controller values.
 
What are my options for implementing this?
 
Ideally I'd use a FPGA 783xR PCI card, but could also use Compact RIO.
Ideally the user would edit a config.txt file on the host PC to set the PI parameters, this file would be read by the FPGA when execution was started via an external digital input (an on/off switch).
 
I'm could create a .exe labview program that sets the PI values on the FPGA, then add this to the host PC start-up menu.  But I would really like the FPGA to retain the new PI values permanently once changed by the user.  I could deliver the full development software and teach the customer how to set the new PI values as the default personality on the FPGA, but this is expensive and messy.
 
Can anyone suggest an elegant solution?
 
 
0 Kudos
Message 1 of 6
(10,298 Views)
bmann2000,
 
You should be able to send the PI controls from your Host VI down to the FPGA target with Read/Write controls.  After the PI values have been written they will be retained on the FPGA target.  I have attached two example of PID control with LabVIEW FPGA.
 
 
 
Looking to help,
 
Steven B.
0 Kudos
Message 2 of 6
(10,286 Views)

I've successfully implemented the PI controller to the FPGA target, and I can update the PI values using the read/write nodes from Labview on the host PC.

 

The problem I have is the FPGA will default back to the old PI values when system power is cycled. 

 

Is setting the default personality of the FPGA the only way to permanently apply new PI values?

0 Kudos
Message 3 of 6
(10,252 Views)

bman2000,

Your correct the FPGA will reinitialize to the default personality.  Ways around this would be to have a initialization stage where the PI values would be passed down.  If your wanting to have th FPGA device be stand alone you will need to set the default personality.  You could also set your system up so that PI values are derived from outside sources, say digital lines or potentiometers.  You could also add your own non-volatile memory that could store the PI values.

Hope that helps,

Steven B.

0 Kudos
Message 4 of 6
(10,208 Views)

I want the FPGA device to be stand alone.  Although I still have a choice between ComapctRIO and the PCI-7833-R.  The 7833-R has all the IO included and as I have a PCI slot available on the host PC which is part of the deliverable anyway, the hardware works out less expensive at £2,570 for card plus cable and breakout, 7833-R saves space and weight too.  The Compact RIO hardware, 4-slots with 4-modules comes out at £3,800.

Neither of these calculations takes into account the cost of the software.   I already have all the development software for both solutions.  However, to give the customer the ability to set new PI values as the default personality on the 7833-R, I would need to deliver a copy of LabVIEW Full Development system £1,725 and FPGA module £1,725. 

To save me time experimenting with a CompactRIO, can you tell me if I'd need to deliver any software to the customer with the Compact RIO to give them the ability to permanently set new PI values.  Could CompactRIO read PI values automatically from the host via Ethernet?

 

0 Kudos
Message 5 of 6
(10,182 Views)
Hi bmann2000,
 
The CompactRIO can function in the capacity of an ethernet enabled FPGA device.
 
The following steps will enable the CompactRIO FPGA device as FPGA target from your host computer:
1.Follow the steps detailed in the LabVIEW 8 FPGA help to configure the CompactRIO's VISA settings for remote access. 2
2.Start a new project in LabVIEW or open an existing project.
3.Right click on My Computer in the Project and select New.. » Targets and Devices....
4.Select the New Target or Device radio button.
5Since the chassis is on a remote system, LabVIEW cannot auto-detect it. Select the CompactRIO chassis model number from the list. This information can be found on the bottom of the cRIO chassis.
6.Click OK.
7.A new FPGA target will show up under My Computer. Right click on the chassis and select Properties.
In the Resource Field, enter visa://xxx.xxx.xxx.xxx/RIO0::INSTR where xxx.xxx.xxx.xxx is the IP address of the CompactRIO module.
8.Click OK. The FPGA is now ready to be used as if it was installed in the host PC.
 
Keep in mind that the FPGA is operating over an ethernet link, and therefore will have the assosciated latencies and speed limitations in communicating with the host.
 
However, you should be able to deliever Host applications that communicate with both the 7833R and cRIO without the need to deliever the FPGA module to you customer.  You would just have to intialize the PI values on the host side and develop your program so that it could change the PI values if you wanted too.  You could also deliver several different Personalities with PI values already set and the user could select between the ones they wanted.
 
Reagrds,
 
Steven B.
Message 6 of 6
(10,174 Views)