LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 9514 FPGA and SoftMotion

Solved!
Go to solution

Hi Gang,

 

I've spent the day configuring a new cRIO system and a new installation of LV2012 with RT, FPGA and Softmotion.

 

Our system uses a CAN interface, which, we find out, requires using FPGA mode.  Maybe that's not a bad thing, as we are concerned about the speed of scan mode.  I've developed an FPGA app before.

 

My main concern right now, is to get the motion control stuff working.  Our motion module is an NI- 9514.  I'm hoping there's a way to use SoftMotion modules with the FPGA interface. Otherwise, the FPGA motion examples look REALLY daunting!

 

All I need to do is simple relative moves and homing.  I'll appreciate all help/advice on the simplest/fastest way to get going.

 

Thanks!

 

Roger

 

 

 

 

 

 

0 Kudos
Message 1 of 5
(4,960 Views)
Solution
Accepted by topic author RogerMont

Hi Roger,

 

You can use the 9514 without using the 'daunting' examples by using the cRIO in hybrid mode. There are good instructions on how to do this here. A quick summary is that you have to put the modules that you want to use in scan mode under the chassis and the modules you want to use in FPGA mode under the FPGA. When you compile the FPGA bitfile, the RIO scan interface is compiled for the modules that are under the chassis so that you can use them in scan mode. A few caveats:

 

  • The FPGA VI must be running to use the 9514. When you are in scan mode, the FPGA automatically runs without you having to do it. However, in hybrid mode, the FPGA only runs when you explicitly run it.
  • The FPGA VI must be running for you to deploy axis settings to the target. This can be a little awkward during development when you're making changes to the axis configuration. Typically you run the FPGA VI by using the Open FPGA VI Reference in an RT VI. However, when you run an RT VI, it checks to see if the deployed data is consistent with the project data, and if not, prompts you to deploy. Remember, though, that you can't deploy because your FPGA VI isn't yet running (since it won't run until the Open FPGA VI Reference runs). When you try to deploy, you will get an error (I think it is something like 'IO module not found'). What I generally do is during development, run the FPGA VI manually (by pressing the run button). Then you can run your RT VI that uses the FPGA VI Reference and everything will work. You will only run into this issue if you are changing the axis configuration in the project (and therefore won't be a problem for your final application when your axis settings aern't changing). If you are changing the axis configuration programatically, you won't run into this issue. 

As a side note for those using the 951x motion modules, unless you really need to do something custom, you should use the 951x modules in scan mode. The performance is better in scan mode than it is in FPGA mode (assuming you want to use the high level SoftMotion API (EXVIs, function blocks, or properties/methods)). When you use it in FPGA mode, there is extra delay in getting the data from the FPGA into the SoftMotion engine. Plus, you are still coupled to the scan engine! So you get worse performance, a more difficult experience, and you don't even remove the need for the scan engine. There are valid reasons to use the 951x modules on the FPGA (e.g. custom control loops), but most applications I have seen that use FPGA would be better served using the module in scan mode.

 

Thanks,

Message 2 of 5
(4,951 Views)

WOW!

 

Thanks, Paul!  This motion control newbie appreciates your detailed reply.

 

I'll dig into this today.

 

Roger

0 Kudos
Message 3 of 5
(4,938 Views)

Hi

 

Ditto. Helpful comments. Thanks

 

If you do run the 9514 in FPGA mode, does the 9514 still run its own PID, or is it disabled somehow. The "Servo Interface 9514" example (which is an FPGA mode example), shows a position PID which is then written to the Drive Command OUTPUT.

I'm guessing that means the on-board PID controls that would normally run in the scan mode are disabled somehow. Is that correct ? Or does that PID still run as an 'inner loop' withe the position PID (fed by the spline engine) the 'outer loop' ??

 

Thanks

0 Kudos
Message 4 of 5
(4,917 Views)

Hi,

 

You are correct that the 9514's PID is disabled when using it in FPGA mode. In scan mode, you are sending position setpoints to the module and the module sends these setpoints through a PID loop to generate the +/-10V control signal. In FPGA mode, you write directly to the +/-10V line. What kind of control you use (traditional PID, cascaded PI, direct torque control, etc) is up to you.

 

Thanks,

0 Kudos
Message 5 of 5
(4,898 Views)