cancel
Showing results for 
Search instead for 
Did you mean: 

access class from seperate loop

SOLVED
WayneS1324
Member
Solved!

access class from seperate loop

Message contains an image

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

4 REPLIES 4
Ben
Knight of NI Knight of NI
Knight of NI
Solution

Re: access class from seperate loop

Message contains a hyperlink

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
WayneS1324
Member

Re: access class from seperate loop

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.

Ben
Knight of NI Knight of NI
Knight of NI

Re: access class from seperate loop

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
WayneS1324
Member

Re: access class from seperate loop

Thanks Ben.