LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot control the motor motion and the FPGA data acquisition simultaneously

Solved!
Go to solution

I am a student in the UK, I am trying to control the stepper motor and acquire some data by NI 9215 interface (FPGA) simultaneously. I can control the motor and data acquisition separately. But once I run the FPGA part, I lose control of the motor even if I restarted all systems and there was an error on NI 9512 (-70233). I think I have set cRIO-9037 in hybrid mode. How can I solve this problem? Please see more detail below:

Hardware: cRIO-9037, NI 9512 (stepper interface), NI 9215 (analog input).

 

 

Download All
0 Kudos
Message 1 of 7
(2,185 Views)

We cannot debug truncated pictures of block diagrams.

0 Kudos
Message 2 of 7
(2,122 Views)

I am sorry about that and I have updated them. Thanks for your help.

Download All
0 Kudos
Message 3 of 7
(2,113 Views)

Your case structure in the bottom half will only execute one time since there is no loop around it.

0 Kudos
Message 4 of 7
(2,107 Views)

Yes, the motion part only needs to run once. Actually, I can control the motor by the NI 9512 in an individual project, as well as the data acquisition (NI 9215 FPGA). When I put them into the same project(VI A: only control motor motion, VI B: only achieve data acquisition from the FPGA, VI C: combine the VI A and VI B), VI A can be run and useful if I never run VI B. But as long as I run VI B once, VI A cannot control the motor anymore even if I restart all systems. There is waring from softmotion: the specified device was not detected. In short, how can I achieve the motor control and data acquisition from FPGA simultaneously (VI C)?

 

Thanks a lot.

0 Kudos
Message 5 of 7
(2,097 Views)
Solution
Accepted by topic author Lei_UoN

You must not have the 9037 in hybrid mode correctly. I use a 9047 as hybrid to operate several 9512 mods and a 9253 on the fpga. From your code, you're not re-initializing the scan engine. You need to start the fpga in a certain sequence with the scan engine.

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019MEvSAM&l=en-US 

 

This may not be your only issue. You need to have at least one module deployed as a real time scan resource before you build the fpga bitfile, in order to get the scan engine logic compiled into the fpga bitfile.

 

The other thing that tortured me was that the fpga bitfile needs to be running before you add a softmotion axis. Reply if you need clarification on that, in case the first suggestion wasn't your only issue.

0 Kudos
Message 6 of 7
(1,978 Views)

Yes, the mode reset part should be added or run before running the main VI. Thank you!

0 Kudos
Message 7 of 7
(1,948 Views)