OK, I just answered my own question:
The solution was simple. I took the message box outside the case structure. Now, this on it's own doesn't fix the problem but I also added a compound 3 input AND gate.
The inputs to this were from Limit Switch 1, the On/Off switch, and the switch that reverses the motor direction (sorry, I didn't mention that last one). I then added more code that changes the Forward/Reverse front panel switch to the opposite of where it was.
Now, these inputs will only give an output when a/ the motor has stopped, b/ the Forward/Reverse switch is in the correct direction for that Limit switch, and b/ that Limit Swtch has been activated. All of this is only TRUE when the CASE structure has already done it's bit and finished. Therefore the message box doesn't interfere with anything.
Steve.
Thanks to everyone that answered:
I composed my solution reply and sent it before I realized that you had all taken the trouble to answer, sorry.
Now, I did try putting a sequence inside the case statement but it isisted on the last sequence (the message one) being finished before it would do what was in the first two boxes in the sequence.
I checked the NI site and there was an article there that said something about all things being completed in a sequence before it would carry out the instructions in the whole thing? I thought this was odd!
Until 2 weeks ago I had never used Labview (I was brought up on BASIC ,VB, and Delphi).
Programing with pictures has been a struggle but I'm getting the hang of it.
Right, I must read about threads and state machines :-)
I am sure that in a few months time I will look back at this first program and wonder how I managed to write it so badly: That's programming.
I am also sure I will be asking some more questions, and this time I'll check for answers before sending my own replies!
Have a good weekend.
Steve Lawson
York University
Physics Department.