LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need a tip for a Fieldpoint program

Hi,

I have a main program which includes several subprograms. The used hardware is Fieldpoint. (several AI)
All subprograms uses different channels of those AI.

What is the better way to deal with this AI:

- reading all AI's (with "fp read") in a array and reading parts of the array in the subprograms

- or reading appropriated AI's in the subprograms separatedly (with "fp read")

Thanks for any hint

Yves
0 Kudos
Message 1 of 9
(3,828 Views)
Hi Yves,

First, what AI module do you have ? Is it FP or cFP ? I ask this just to make sure that you won't try to read value faster than they will be refreshed by the module.

I would make a loop that runs at a constant rate close to the refresh rate of the AI module, this loop would just get all value fron the FP and place them in a FGV, then everywhere you need these data in your soft, you can call you FGV and be sure to get the lastest value.
You can also attach the timestamp with your data if needed...

Hope tis helps 😉


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 2 of 9
(3,824 Views)
@ titou

Well, I have both sort of FieldPoint modules.
What do you mean with FGV? (sort of Global value?)
0 Kudos
Message 3 of 9
(3,819 Views)
FGV... Functional Global Variable, also known as LV2 global.

You'll find many discussions on the forum on what it is, how to use it and so on... It is slightly different from a global variable and I think it is more adapted to your application.
I made a small project a while ago using a FGV to "share" data measured by a FP system. Let me know if you need some example code.

Hope this helps

link 1, definition (link 2)

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 4 of 9
(3,807 Views)
@ titou

Oops, well I didn't know that variable although I'm in LV since 6.0.... Smiley Sad

An example would be great, of course.

thanks for your precious help.

yves

0 Kudos
Message 5 of 9
(3,797 Views)
@ titou

I'm using LV 8.0.1 (no RT and RT hardware) and WinXP
0 Kudos
Message 6 of 9
(3,793 Views)
Hmmm... unfortunately my project was under LV 7.1 and and don't have LV6 so the maximun I can do for you is to send you some screen shots of the code.. Smiley Indifferent

Is it urgent for you or do you think you can intend to do it yourself ? I might not have time to dig this out before the end of this week...


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 7 of 9
(3,790 Views)
Ohhh... you have LV8... Well... so I'll send you some code shortly 😉


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 8 of 9
(3,788 Views)
Hi Yves,

This code is not FP specific, but it demostrates one of the thing you can set up with FGVs.
Note that in your case, a cluster or an array, or maybe an cluster with one array for each AI module would do the job inside of the FGV.

Feel free to ask any question 😉


Message Edité par TiTou le 11-09-2006 02:18 PM


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 9 of 9
(3,765 Views)