01-11-2010 01:46 PM
I am having several issues with the 3D Picture control in Labview.
I designed a manipulator and have connected it to my computer through USB. The manipulator can be controlled by simple serial commands (the USB portion of the manipulator is just a USB->RS232 converter) and I have implemented a simple communications chain in labview. This portion seems to work perfectly.
For experimentation purposes I decided to implement a simple visualization. Basically I want to make a representation of my manipulator in labview in 3D using simple primitives and the 3D Picture control. This will allow me to do a sanity check to ensure that the manipulator is in the correct pose I have commanded it to be in during experimentation. To do this, I made a while loop in which I generated the coordinates/orientation where I wanted to spawn a primitive, created the primitives, oriented the primitives, translated the primatives, and finally sent them to be displayed in a 3D picture control. The while loop was set with a delay of 100ms making this visualization update 10 times every second which matched the frequency of sending updated commands to the manipulator.
I implemented this and it seemed to work, however after ~2 to 5 minutes of running the VI, Labview crashed. I looked over my work and noticed that every loop iteration I spawned a new primitive without deleting the previous one and assumed I caused some sort of memory related error.
To fix this I attempted to remove the primitive generation portion from the for loop, stick the references to the set of primitives into an array, and then pass the array into the loop. In the loop I would clear the previous transformation, retransform the primitives to thier new locations, and display them in the 3D picture control as I had previously.
Unfortunately that did not seem to work. I keep getting an error, specifically: "Error 1055 occured at Invoke Node in NI_3D Picture Control.lvlib:Clear Transformation -> Sim3DDisplay2.vi -> ManipulatorSim3DV2.vi" and "LabVIEW: Object reference is invalid". Since I am passing the array of references into a subVI I made, does this mean that the references to the objects generated in the parent VI are not concidered valid in subVIs or am I simply doing this wrong?
01-12-2010 05:43 PM
Hi MCDPekala,
My initial thought on that error is that perhaps it's occurring when the primitive object to which the reference refers has already been cleared. It might be helpful to share your code, at least a screenshot of the block diagram to show exactly how you've architected this.
Thanks,