LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help VI change position

Solved!
Go to solution

Good afternoon Altenbach,

 

  Please excuse my horrible code smell, beginner at all of this. The purpose of the VI is for the user to select a position on valve and it displays the changed position. The Tanks are not necessary, just wanted something to display change in volume when position is changed. Can you send an example I can work with using the VI I included??? What do you recommend time for timeout? Can I remove stop buttons? How do I change the resolution of timer? What is a proper state machine? I'm assuming VISA resource isn't a proper state machine and opening and closing loops. I need an example using the VI submitted to better understand, as you can tell I'm supper lost. Main issue is VI works but for some strange reason, randomly, the position selected doesn't correspond to the hardware position. It work with no issues but I originally notice the problem when I switched serial cable to ethernet. I have multiple serial to ethernet converters, so for troubleshooting purposes I bypassed with straight serial cable to serial to usb adapter connected to laptop on one end and the other end to valves. Please help, thanks in advance!!!

0 Kudos
Message 11 of 16
(507 Views)
Solution
Accepted by topic author Manny904

Here's a quick modification for 1/3 of your code. It would be easy to add the rest in a similar way. (use the captions for the detailed headers). Position should maybe be an enum.

 

Since I don't have your hardware, I don't know if the instrument I/O is correct and I have blanked it out.

 

 

0 Kudos
Message 12 of 16
(501 Views)

Thank you Altenbach, by adding this modification will VI open and close loop, preventing register shifting on hardware? 

0 Kudos
Message 13 of 16
(480 Views)
Solution
Accepted by topic author Manny904

@Manny904 wrote:

Thank you Altenbach, by adding this modification will VI open and close loop, preventing register shifting on hardware? 


Sorry, I have no idea what you are trying to say here. I am not a "hardware" guy and mostly focus on code architecture, not interactions with instruments. Take any of my advice as just that.

0 Kudos
Message 14 of 16
(465 Views)

Thank you Altenbach,

 

  I made the modification, replace hard ware. I apologize for the confusion, ran test with modifications and it passed. 

0 Kudos
Message 15 of 16
(453 Views)

Glad you got it working Manny!

 

If you get a chance, please select Altenbach's post as the solution for this thread.  It helps us know when an issue is resolved so we can move on to help other users. 

Clicking the Kudos button on posts that helped you is a nice way to say thanks too. 😉

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 16 of 16
(446 Views)