LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with a closed loop

I will briefly describe what i am doing, but my problem is not with any hardware it is with programming iterative loops in labVIEW.
What i am trying to do is get the input for an activex aircraft instrument. The attitude data is coming from an inertial sensor connected directly to com1. The activeX instrument that is causing problems is a turn coordinator. Which, in real life, includes a ball in a curved tube surrounded by a viscous liquid, sort of like a spirit level. I need to determine the position of this virtual ball based on the real acceleration data. My initial thoughts were, and would be possible in another language, start with an initial ball position. Using this initial position and body axis acceleration calculate th
e tangential acceleration present on the ball and from this calculate the distance travelled in a small period of time. This short distance would then be added to the inital position to find the new position. The procedure would then start over with this new position. However i cannot just join the wires in labVIEW up like this as i get an error saying there is a closed loop that cannot be executed.

Can anyone tell me how to construct a loop that uses an inital value which is then used in a calculation to update that inital value? Please find attached my very poor attempt at this VI. I hope things will be clearer by looking at my first attempt, and someone will be able to tell me what i am doing wrong

Phil
0 Kudos
Message 1 of 5
(2,170 Views)
It looks to me like you need to use a Shift Register. Right click on the border (left or right) of a loop and select "Add Shift Register". The way it works is you can wire an initial value to it as an input on the left side. Then, inside the loop you wire the next value to it on the right. Therefore, the value of the register is the value wired to it in the last iteration of the loop, or the initial value if it is the first iteration.

Hope this help.
Naveen
Message 2 of 5
(2,169 Views)

Hi all:

My name is Laura Andrea Gonzalez, I am a student of aeronautical engineering who is looking for advice about how can I to integrate the Aircraft Instrument ActiveX instruments (from global majic) into a Labview?.

I am developing a ground station control for a remote control instrumented RC airplane for my flight dynamics course.

Could anyone lendme advice on where to get started?

Your help is very important for me.

Thank you

Sincerely,

Laura Andrea

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

Hi Laura,

Althrough I do not have an answer for your query,I wish to make a suggestion

Its advisible that you start a new thread with an apt subject line for your query, instead of posting it as a continuation for a 5 year old thread

That way, a lot more people will notice it and reply

0 Kudos
Message 4 of 5
(2,001 Views)
Hello Laura,

Basically what you'll want to do to get stated is to register your ActiveX object with the operating system. If the supplier's documentation of how to register is not complete, then I would suggest you take a look at the knowledgebase discussing manual registration of ActiveX objects.  

Once the object is registered, you can open an ActiveX reference using the Automation Open VI on the block diagram. The registered object will show up as a selectable class in the class browser when you right click on the automation refnum. Now with the automation reference, you can use property and invoke nodes to interface with your remote control device. For an overview of ActiveX use in LabVIEW, please take a look at the linked application note. I hope this information is useful for you!

Mike D.
National Instruments
Applications Engineer
0 Kudos
Message 5 of 5
(1,977 Views)