LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

access class from seperate loop

Solved!
Go to solution

Here's where I'm at. I need at access the data members of the positioner class from the second loop. I cant seem to figure it out.

As you can see... I'm new at LVOOP.

class.JPG

0 Kudos
Message 1 of 5
(2,343 Views)
Solution
Accepted by topic author WayneS1324

Search for the design pattern called "Sinlgeton".

 

A non-LVOOP version would be called an Action Engine.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 5
(2,341 Views)

I will do that Ben... thanks.

 

One quick question though. Is there any reason I shouldnt create an indicator at the right shift register in the top loop, and then use

a property node (value) in the bottom loop?

 

EDIT: The purpose is to use OOP though. Unless I dont understand correctly.

0 Kudos
Message 3 of 5
(2,335 Views)

First quick answer is "the indicator on the outside of the loop will not update until the loop is done.

 

If inside just prior to SR, sure you can get away with it but you are opening up a situation ripe for a race conditions.

 

Singlton is the LVOOP answer.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 5
(2,325 Views)

Thanks Ben.

0 Kudos
Message 5 of 5
(2,317 Views)