LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a Slider to jog a linear ball screw in opposite directions

Solved!
Go to solution

Hello,

 

I have a linear ball screw run by a motor/controller setup. I would like to use a Slider to essentially "jog" the platform mounted on the screw forwards or backwards a certain distance. However, the controller has its own language to control the movement of the motor. For example, /1P10000R would move the motor addressed as "1" 10000 steps in the positive direction and /1D10000R would move the motor 10000 steps in the negative direction. My question is this: If I set the slider to range from -100 to 100 mm, how can I get the output to have a "P" in front for numbers ranging from 0 to 100 and a "D" in frontfor numbers ranging from -100 to 0? I guess, fundamentally, how does the slider handle negatives? I have a vi to convert the numbers from mm to steps.

 

Thanks. 

Message Edited by manchmal2 on 05-14-2009 03:55 PM
Message Edited by manchmal2 on 05-14-2009 03:55 PM
0 Kudos
Message 1 of 3
(2,584 Views)
Solution
Accepted by topic author manchmal2

Hi manchmal2,

 

using string formatting functions?

Message Edited by GerdW on 05-14-2009 11:03 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(2,580 Views)

That worked well. Thanks so much!

 

manchmal2

0 Kudos
Message 3 of 3
(2,562 Views)