LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to control many VI's in one module ?

hi 🙂
 
i have principle question. i work with DAQ board, that acquire digital infirmation ("1" or "0"),
 in addition, i need to control motor through rs-232 cable. 
i want do acquire  data "non-stop", and show in leds (on the control panel) the actual state ("1" or "0").
simultaneously, i want to control (=send/red data) the motor.
 
how i need build this program (if it possible) ?
 
thank's

Message Edited by pro111 on 12-03-2006 11:33 AM

Message Edited by pro111 on 12-03-2006 11:33 AM

0 Kudos
Message 1 of 7
(3,078 Views)
update for my problem:
i build while loop for data acquisition from DAQ , and sequence structure(with 5 frames)  for communicate throgh RS-232 with motor.
 
i use GLOBAL parameter that send data from DAQ to  sequence structure.
i noticed that when i click RUN button, thare is almost 30 seconds approximately, until the daq start to acquire.  why that happen ?
 
is it unallowed  to send data from while-loop (through global parameter) to sequence structure ?

Message Edited by pro111 on 12-03-2006 12:42 PM

0 Kudos
Message 2 of 7
(3,073 Views)

It's allowed but it's pretty bad style to use gloabal variables and a sequence structure alone or together. To run two functions in parallel, the simplest mcthod is to have two different while loops. As long as there is no data dependendy (wires connecting the output of one to the input of the other) they will be completely independent. If you need to pass data from one to the other, one good technique is a queue. Also, instead of a sequence structure, you should look at using state machine. A sequence structure doesn't give you any flexibility. There are shipping examples and design templates avialable for both queues and state machines.

Since you didn't attach your program, there's no way of telling why you are seeing a delay. At the very least, attach an image of the block diagram.

0 Kudos
Message 3 of 7
(3,063 Views)
dennis, here is my program
0 Kudos
Message 4 of 7
(3,057 Views)
Sorry, I don't have LabVIEW 8. Can you save it as 7.1 (prefered) or post an image of the block diagram?
0 Kudos
Message 5 of 7
(3,057 Views)
certainly.
 
0 Kudos
Message 6 of 7
(3,052 Views)

It seems that you are not using an NI DAQ board. My only suggestion would be run the VI without the sequence structure to see how long the initialize and setup of the daq board takes.

Also, as mentioned by both me and altenbach in a different post, you might want to rethink the use of the seqeunce structure and use a state machine. You would have more flexibility and a better error handling mechanism. And, your wait statement in frame three can occur either before or after the rest of the code in the frame. If you are trying to pause before going to frame 4, it may or may not happen that way. There is no way to do it reliably with this code. Why don't you use the delay statement. It has error in/error out connections that allow you to control dataflow (hence execution order).

Message 7 of 7
(3,045 Views)