LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to store the data of all the blocks when they are running in a loop, when there are no of bolks with in the loop in the bock diagram

Dear Sir,
 
We are using USN6229 and Labview. We are running a Servo motor using pulses to get the reciprocating motion in CC and CCW directions by using the same block diagram in two blocks one after the other and keeping these two blocks with in the loop. How can we read the data in the same loop simultaneuosly from the servomotor, while the two blocks are running.
 
Thanking you Sir,
 
YS
Timmaraju.
0 Kudos
Message 1 of 6
(3,538 Views)
Hi Timmaraju,
can you upload your vi? Do you mean the USB-6229?
Mike
0 Kudos
Message 2 of 6
(3,509 Views)

Hi Timmaraju,

Welcome to the forums! Mike's request is a good one, could you attach your program? This could give us a better idea of what you are trying to do with the VI so that we could make suggestions about changes for the data display.

When you say that you are using blocks, did you mean actual functions, a case structure, or a sequence structure? This will be apparent if you attach the VI. Also, did you begin with an example program, or did you start from a blank program?

Regards,

Mallori M.

Mallori M
National Instruments
Sr Group Manager, Education Services

ni.com/training
0 Kudos
Message 3 of 6
(3,491 Views)
Dear Sir,
 
We are using USB6229 data chord and Labview. We are running a Servo motor using pulses to get the reciprocating motion in CC and CCW directions by using the same block diagram in two blocks one after the other and keeping these two blocks with in the loop. How can we read the data in the same loop simultaneuosly from the servomotor, while the two blocks are running.
 
As you asked me I am attaching the block diagram, I am using. Please kindly guide how can I read the data of the instruments with in the same loop while blocks are getting executed.
 
Thanking you Sir,
 
YS
Timmaraju.
0 Kudos
Message 4 of 6
(3,448 Views)
It's usually best to attach VIs directly rather than taking a screenshot, putting the screenshot into a Word document and then uploading the Word document. If you took the screenshot, why not just upload the screenshot directly? Besides, many people don't have Microsoft Word, but anybody with a browser can see a screenshot. Smiley Wink

You should spend some time going through the LabVIEW tutorials and taking some of the online courses (two of which are free). The code you replicated should be in a subVI. In order to run something "at the same time" as another, you just place this something else on the block diagram with no wires connecting the two. LabVIEW is a dataflow language, and will run the two pieces of code in parallel, as shown below:



To learn more about LabVIEW it is recommended that you go through the tutorial(s) and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.


Message Edited by smercurio_fc on 06-06-2008 09:07 AM
0 Kudos
Message 5 of 6
(3,434 Views)

Hi Timmaraju,

 

Smercurio made a great point about our online tutorials. I recommend looking through the 3 and 6 hour online courses, because this will help in your understanding of your overall programming.

 

A few points to begin with though, looking at your program. Right now, since you are using a flat sequence structure which is what is enforcing one task completing before the next begins. Do you want these two tasks running in parallel (at the same time)?

 

Something to note is that some counter tasks require both counters. If this is the case, then upon running the tasks in parallel you might receive a resources reserved error.

 

I hope this information helps, Regards

Mallori M.

Mallori M
National Instruments
Sr Group Manager, Education Services

ni.com/training
0 Kudos
Message 6 of 6
(3,399 Views)