LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continously data collection and events

Hi Folks,

I need a suggestion about how to get DATA continously and trigger another events simultaneously .

 

 

Here is my vi snippet with continously monitoring the motor value and direction but wanna trigger and change it movement in rel and abs.

I also have two hall sensors as end switch called in events.

 

Can you help me ??

Boldness has genius, power and magic in it!'
0 Kudos
Message 1 of 4
(2,256 Views)

Hello Maveen,

 

I would advise you to use a produce/consumer template, with:

- an event structure inside a while loop: FP commands to trigger the change will be there

- the main while loop: VISA instructions will be sent there to your motor, to change the motor motion

- a secondary while loop: read data from sensors and make some computation to display motor value and direction

 

That's only my idea, but someone more experienced may tell you better.

Good luck.

 

Florian

0 Kudos
Message 2 of 4
(2,245 Views)

The attached picture tells nothing about, what you've done in your code or what design pattern are you using now...!!

 

flongnos said correctly, some design pattern based out of 'Parallel Loops' is needed, when you have two or more processes that need to run simultaneously and continuously (may be at different rate).

 

You should check:

Application Design Patterns


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 3 of 4
(2,219 Views)

There is absolutely nothing wrong with having multiple loops in a VI.  Things that need to run in parallel should be in separate loops.  Study the Producer/Consumer architecture.  You can communicate between loops using Queues, Notifiers, or User Events.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(2,206 Views)