LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

graphing force versus distance in xy graph while running two parallel while loops

I have written a program that controls an smc 100 actuator. The actuator came with several vi's to control that I have implemented into the program that I have written.  The first frame in my flat sequence program initializes the actuator to the zero position.  The second frame allows the user to specify an incremental displacement for the actuator and a speed in mm/s.  The goal is to have the actuator to stop movement once the newest force value is less than the previous force value and proceed to the third frame.  The third frame once again returns the actuator to the zero position.  My problem is in the second frame where I want the values of displacement and force to be input into an XY graph and to write to a measurement file to be read in an Excel spread sheet.  The measurement file when opened has the correct values for force and displacement however the XY graph never shows anything.  I do not know if I just have the graph configured wrong or if the way my program is set will simply never work.  Any help or advice will be greatly appreciated. 

 

Thank you,

Gabe.

0 Kudos
Message 1 of 9
(5,154 Views)

Pleas attach the actual VI (or a simplified version) instead of an image embedded in a word document.

0 Kudos
Message 2 of 9
(5,147 Views)

did not know if the specific vi's for smc 100 would show up so I put it into a word document. I will try sending the the actual Lab View program now.

0 Kudos
Message 3 of 9
(5,136 Views)

You are resetting the graph each iteration. Double click on it and see.

0 Kudos
Message 4 of 9
(5,130 Views)

I wish I could check right not but this is a project for school and I do not have the DAQ, the SMC, or the serial to USB connection because I am at home.  Actually I do not have anything that the program requires to run properly.  So my next question is how do I get the graph to stop resetting if it is inside the while loop.

Thanks,

Gabe

0 Kudos
Message 5 of 9
(5,123 Views)

Double click on the Express VI for build graph and clear the checkbox that says "Clear each call".

0 Kudos
Message 6 of 9
(5,110 Views)

 


@Gabe J wrote:

I wish I could check right not but this is a project for school and I do not have the DAQ, the SMC, or the serial to USB connection because I am at home.  Actually I do not have anything that the program requires to run properly.  So my next question is how do I get the graph to stop resetting if it is inside the while loop.

Thanks,

Gabe


I don't have any of the subVIs or hardware either but none of that is required to see how you configured the express VI.

 

0 Kudos
Message 7 of 9
(5,108 Views)

In one of my reply posts I attached the actual program.  If you have any advice for configuring the XY graph and any advice as to why my XY graph is not showing any date ( i.e Force Vs. Distance) It would be greatly appreciated.

0 Kudos
Message 8 of 9
(5,078 Views)

I don't quite understand your loop stop logic, but why don't you simply accumulate the xy data in a 1D complex array?

 

I would also use a plot style with "points", not just lines, just in case there is only one point.

 

0 Kudos
Message 9 of 9
(5,058 Views)