LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

set timing for loops

hi need help

i have an array(requesting data like hyperterminal)...

let say my first index is requesting ... let say i have got reply... i must continue the second index

if my first index request is not response i have to request it for 30 second ..and if it didnt reply thn only i hv to go to next index..

hw to do tht?

can anyone help

thk u

0 Kudos
Message 1 of 6
(2,937 Views)

Look at the standard state maschine design pattern. You can find this under File > New... > VI > From Template > Frameworks > Design Patterns.

 

You have three states: Send request, Wait for response and exit. Additional you need a shift register holding the index into your array. Start with Send request sending the request to the device. Then change to Wait for response. Here you can check for timeout and repeat the response. If you got the response you can change the index and send the next request. At the end of the array you can go through exit.

 

You can add other states if need for e. g. initializing the communication or other things.

Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 2 of 6
(2,933 Views)

hi thk u

can i have an example of this... plz...

thk u

0 Kudos
Message 3 of 6
(2,918 Views)
i  dono how to do this part "Then change to Wait for response. Here you can check for timeout and repeat the response." can i get an example.plz
0 Kudos
Message 4 of 6
(2,914 Views)

Hi jeyanthi,

 

As waldemar said in his post, in LabVIEW, click on File, select New... (make sure you select the one with the dots), expand the folders named VI, then From Template, then Frameworks, and finally Design Patterns. The Standard State Machine example should be an example of what he is talking about. For more information on state machines, see this document.

 

Regards,

Stephen S.

National Instruments
Applications Engineering
0 Kudos
Message 5 of 6
(2,873 Views)

I created a small example from the template I mentioned and added the two states I was refering to. There is a wait miliseonds function included. This is just to slow down the VI and allow you to see in the indicators what is happening.

 

The examaple is in LV 8.0.1.

 

Stephen S. thank you for adding the tutorial to the thread.

Message Edited by waldemar.hersacher on 10-09-2008 10:36 PM
Message Edited by waldemar.hersacher on 10-09-2008 10:38 PM
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 6 of 6
(2,871 Views)