02-03-2020 04:39 AM
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).
Solved! Go to Solution.
02-03-2020 11:16 AM
We cannot debug truncated pictures of block diagrams.
02-03-2020 11:42 AM
I am sorry about that and I have updated them. Thanks for your help.
02-03-2020 12:08 PM
Your case structure in the bottom half will only execute one time since there is no loop around it.
02-03-2020 12:53 PM
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.
02-09-2020 12:52 AM
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.
02-11-2020 10:35 AM
Yes, the mode reset part should be added or run before running the main VI. Thank you!