11-12-2009 01:57 AM
Hello.This is my first question here. When i try to make FPGA code for four NI 9505 (with position loop (including SplineEngine), current loop, PWM loop and encoder loop) i simply duplicate code for module four times. I use NI 9104 chassis with 3M gates, but compiler returns error compilation (i suppose, code doesn't fit on FPGA). I've tried to make code more simple (i've combined some terminals). But it didn't help me. Thanks a lot.P.S. sorry for my english.
Solved! Go to Solution.
11-12-2009 03:46 PM
Hi Nikita,
You're suspicion is correct. 4 axis motion controll cannot be done on a 3M gate FPGA. It has been done on a 5M gate FPGA, but code modification still needed to be done (such as making controls into constants).
Which version of SoftMotion are you using? If there are function blocks in your code it is 2009. The NI SoftMotion Module for LabVIEW 2009 uses the 951x modules. There is an additional FPGA within the 951x modules that will host the PID control (the FPGA is not user configurable, however); therefore, lifting the load from the FPGA in the cRIO backplane. In addition, these modules will utilized the cRio's scan interface. You will be able to use 4 modules (4 axis) with the 951x modules.
I hope this helps
Kristen H.
11-13-2009 03:30 AM
Hi Nikita,
It is possible to run four NI 9505 modules on a 9104 chassis (including position control, with SoftMotion). I run a few systems that do exactly that, and they still have room left on the FPGA for absolute encoder processing and other digital I/O. You will need to be quite careful with your code, though. For example I'd suggest running the current and position PID controllers as for-loops rather than creating 4 separate instances.
That should be enough to get everything to fit, but if it still doesn't work then you may need to consider coding up your own Spline Engine block. Having 4 instances of the SoftMotion Spline Engine seems to use up about half of a 3M gate FPGA alone! This may sound a bit daunting but is easier than you'd think - I did it recently (to get access to acceleration and velocity feedforward signals) and was very pleasantly surprised at how quickly everything compiled afterwards. Unfortunately I'm not able to publish my code, sorry.
If you have the budget available, though, then a newer FPGA is still likely to be the quickest way to get it all working!
Ian
11-16-2009 12:55 AM - edited 11-16-2009 12:58 AM
Hi Kristen and Ian!
Thank you for your replies.
I use LabView 8.6.1 with Soft Motion 2.2.
Unfortunatly, i am not able to use other modules and chassis and I’ll try to follow Ian’s advice. I’ll attempt to modify code for use one instance of spline engine instead of four. I think it should help.
Nikita.
12-11-2009 05:25 PM
This post might be a little delayed - but I have done extensive work with getting many 9505 modules compiled on a number of different FPGA targets. Seven on a Virtex II 3M gate and eight on a Spartan3 2M gate (don't be fooled by the gate size - the Spartan FPGA's tends to be more efficient in compiling size, but worse with timing as compared with the Virtex II's. The Virtex5's are better all-around).
They key is to "mulitplex" code - especially the SoftMotion splining algorithm. Multiplex in this sense means to use as much of the same code for each axis and process things serially vs in parallel. Since splining requires saving significant data for each axis between loop itterations, these VI's use the block RAM on the FPGA vs using large arrays in FPGA fabric.
I've attached some code that will work with LabVIEW 8.6 and SoftMotion 2.2. This will NOT work with SoftMotion 2009 (both the RT and FPGA VI's have changed).
12-14-2009 04:54 AM
Hi MarcoPolo5!
Great thanks for your post! You've made great job in improvements of using NI 9505 with Soft Motion.
I've just started use FPGA and NI software and your help is very useful for me.