02-08-2012 06:06 PM
I am Communicating over pcmcia 1553 condor card. i have a 3 frame sequence structure. in frame 1 i am initializing the 1553 card. In the second frame i have a big while loop with a smaller while loop inside of it sending a 1553 string command to my hardware instrument, which is updating every second. outside of the inner small while loop i have my clusters with boolean buttons. When those buttons are pressed they to send a 1553 command to the hard ware instrument. I think this is causing a race condition. In my 3rd frame i close out my 1553 messages. How do i change this to allow my inner loop to update every second unless i boolean button is pressed it would send that 1553 message command, then continue on with sending the updating string every second? So i would like only 1 string to be sent at a time.
Is there a way that would allow when a boolean button is pressed. the string with inside of the true case of the case structure be send out the the hardware and then jump back into the inner while loop and update every second or if no boolean button is pressed stay inside of the inner while loop and update every second?
Solved! Go to Solution.
02-08-2012 10:58 PM
First thing you need to make your code in a standard design pattern. For better understanding check this link
02-09-2012 02:05 AM
Thanks for the reply. I may have chosen the wrong design pattern but i tried using a producer consumer loop but i was having an issue in trying to figure out how to get a loop constantly running in the back ground updating every second.
02-09-2012 02:08 AM
Can you post a snippet of your code/ or the VI itself so that its easy to find out the issue.
02-09-2012 07:56 AM
Here is the code
02-09-2012 07:57 AM
Here is the code
02-09-2012 08:12 AM
The code you have posted is not the right way of doing it. You need to explore LabVIEW more and understand the functions and options available to construct an application. For Continously updating command you have to have a seperate while loop and for sending command depending on the button click you need to have another while inside that you must have an Event structure so depending on the button press you can send the command to your 1553 card.
02-09-2012 08:29 AM
If you post your code we will help you fix it.
02-09-2012 09:26 AM
Thanks for the reply!
02-09-2012 09:27 AM
Tim,
I posted my code a few comments up. 1 & 2 . Thanks for the help!