12-05-2012 01:27 AM - edited 12-05-2012 01:31 AM
Hi all,
I'm on LabVIEW 2012, trying to explore the "Servo Drive (9505)" example. Here's what I did:
Judging by the code, I expected the program to continuously output a sine wave until I hit the stop button. However, it stopped after 2 cycles.
The contour data in the example was an array of 20 points, so I thought that a table buffer of 100 points was plenty.
I placed a Waveform Chart to monitor the "space available" output of the "Check For Space" VI. This was the result:
What's going on? Shouldn't the available space be 20 or less all the time (since the code attempts to write 20 points into the buffer every iteration)?
Solved! Go to Solution.
12-05-2012 08:02 PM
Ok, so when I redeployed the VI and resources on my computer, it worked as expected (previously, the VI and simulated axis were on the cRIO). I'll test it with the actual servo + NI 9505 when they arrive.
Is this a bug with the Simulated Axis on the cRIO target, or did I miss some important setting?
12-06-2012 04:38 PM
The behavior your described in result steps 1 and 2 seem expected. The gradual climb also seems expected, but the drop to zero does not. Does that drop happen after at the third iteration? It makes sense that it stops if the available space dropped below 20. That is what the logic would do between the Check For Space and Update Buffer.
12-06-2012 09:53 PM - edited 12-06-2012 09:57 PM
Ok... now I'm seeing the strange behaviour on my PC as well.
I've re-attached the example with my modifications, for your convenience (It's just the "Servo Drive (9505)" example with another chart tacked on, and the original chart axis modified). Here's a screenshot of the outcome:
I expected:
12-07-2012 04:48 PM
Did you do anything differently from when it was working to now that it is not?
12-08-2012 10:36 PM
@Cameron-T wrote:
Did you do anything differently from when it was working to now that it is not?
Thanks for looking into my issue, Cameron.
I can only think of one big difference: I renamed the axis (via the Project Explorer) in between the working case and the non-working case.
I ended up battling other issues: LabVIEW complained that a deployed axis is missing from the project (because it was renamed, probably), yet spat out an error when I tried to undeploy it. At the time, I was frustrated and worked around the issue by simply creating another axis with the same name as the old one, and leaving both in my project.
However, the test case that I attached above was created from scratch by cloning the official example and modifying it. It should be a fully self-contained case that can be run out of the box; are you able to run it? Does it behave properly?
12-10-2012 03:33 PM
Try using the same example that uses Express VI's instead of Function Blocks (NI SoftMotion >> Express VIs >> Advanced >> Continuous Axis Contour Move). See if you get the same results. I think that this will work just fine with hardware.
12-11-2012 02:15 AM
Mystery solved in a different thread: http://forums.ni.com/t5/Motion-Control-and-Motor-Drives/SoftMotion-Express-VIs-vs-Function-Blocks/td...
I thought that "Update Points" will execute if "Execute" is true, but that's not how it works. Instead, it is triggered by a rising edge at "Execute". In my example, "Execute" is always true, so there is no rising edge.
12-11-2012 04:19 PM
I am glad Paul's insight was able to help. Thanks for providing the link in case anyone else comes across this.