LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with my sub-Vi running in Main

hi all

       lm having problem with my Vi,  my sub-vi  works fine but when i go run the main Vi which is  the forward action with true/false boolean switchs the porgram gives no responce as if the sub-vi is gives no output

 

   any help would be great

 

Download All
0 Kudos
Message 1 of 7
(2,935 Views)

Well your fist major problem is that your buttons are outside the while loop so they will only be read when you start the program. Move them inside of the while loop and see if that helps.

Tim
GHSP
0 Kudos
Message 2 of 7
(2,932 Views)

You also got another problem; Your sub-VI will run for ever if you had no buttons pushed when your run your program. You send "0" to the sub-VI and in the sub-VI you increment the value of your shiftregister and then check if the value = the input, which will never happen.

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 3 of 7
(2,929 Views)
thanks tim
                  ive tryed all does moves it seem to be the sub-vi causing the problem its not getting the change in the boolean true/false value or
would ye think the concatenate could be causing the problem
0 Kudos
Message 4 of 7
(2,926 Views)

OK here is a start to what you need to do. I added an event structure and reworked you code a little. This should give you the concepts to get going further.

Tim
GHSP
0 Kudos
Message 5 of 7
(2,918 Views)

You will eventually have to have a way to get out of the main loop other than using the stop sign. That is very bad practice. You need to add a stop button. I left it the way you did it just in case you had a reason for doing this that I do not see.

Tim
GHSP
0 Kudos
Message 6 of 7
(2,915 Views)

I forgot to change the mechanical action of the buttons. Here is a corrected version.

 

 

Tim
GHSP
0 Kudos
Message 7 of 7
(2,906 Views)