From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to achieve 2 axis control using 2 FPGA VIs?

Hi there,

 

I'm using a cRIO-9074 chassis and two NI 9501 stepper drives, which are each wired to a Superior Electric Slo-Syn motor. Currently, I am able to control each motor individually using two separate FPGA VIs. However, my goal is to be able to control both motors with only one FPGA VI. Essentially, I want to be able to control both motors at the same time

 

Would this be as simple as placing the block diagram from each FPGA VI into a single FPGA VI and building that? Perhaps using them as sub-VIs? I'm certainly not an expert and am somewhat new to FPGAs.

 

Below is a video that is somewhat similar to what I am trying to do if that helps. The major difference being is that he only uses 1 FPGA and another system on the second motor.

 

http://www.youtube.com/watch?v=545p8e5HFOI

 

Any help would be greatly appreciated.

0 Kudos
Message 1 of 4
(2,394 Views)

As long as you have enough room on your FPGA you should be fine. If the two FPGA VIs were independent to begin with, you can just drag and drop one FGPA block diagram on to the block diagram of the other. 

 

Regards,

Ian K.
Software Developer
Data Ahead AG
0 Kudos
Message 2 of 4
(2,352 Views)

Hey Ian,

 

Thanks for you input. I copy and pasted the block diagrams of both into a new "master" FPGA VI and I'm still having issues. When I try to run one of the axes with the Interactive Test Panel, I'll get a an error code -70228, which tells me that the controller is unable to confirm if the drive is enabled. Sometimes the motors enable when I ask them to through the Interactive Test Panel, but only after I do the "Switch to Configuration" and then switch back to active mode in the RTTarget. 

 

I'm going to attach the FPGA VI I'm using. Would you mind taking a quick look at it to see if there's something wrong with it? Again, each axis works fine, with no errors when I run its individual FPGA VI. I also attached the Globals VI I am using.

 

Thanks.

Download All
0 Kudos
Message 3 of 4
(2,328 Views)

This build helped me greatly for anyone working on something similar:

 

https://decibel.ni.com/content/docs/DOC-29605

0 Kudos
Message 4 of 4
(2,282 Views)