LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Buffering in Shared Variables

Hi , (I use LV DSC RT 8.2.1)

 

I think my question is rather basic but it may be the cause for me getting the error 'ni_tagger_lv_Read' too occasionally.

 

I wish to read from a Compact Field Point (or a FP) Controller raw data of a specific channel.

I want to read this data continuously (I do the scaling on the Block Diagram).

When I create a Numeric (double) Shared Variable, the default is 'Enable Buffering' size=50.

As far as I see it, Buffering helps me to collect data and don't lose any of the samples. 

 

1. So if I don't mind to lose some of the samples, should I disable the Buffering ?

2. If can't afford losing some of the sampling should I enable Buffering ? 

    Now, here is the deal : I don't think I understand how to manage the Buffering correctly,

    and that's probably the cause of the 'ni_tagger_lv_Read' error,

    At MAX the Advise Rate of the specific Channel is 100ms, (and it is possible to edit this 100ms... What is the minimum?)

    Is it really the rate that the cFP reads data from the probe and sends it to the Shared Variable Buffer ?

    Is that rate different when I use a Shared Variable on the My Computer section at the Project's tree (bind to that specific channel) rather 

    than deploy it at the RT Target. 

    Can I tell the size of the Shared Variable Buffer Programmatically?

    How can promise a healthy Buffering ?

 

 

Sincerely Yours,

Amitai Abramson.

0 Kudos
Message 1 of 5
(2,801 Views)

Hi Amitai,

 

There is a Developer Zone Article that has a lot of information on using shared variables.  There is information about buffering about 1/3 of the way through it.  Does that answer your questions?

 

Also is there an number associated with your error?  This KnowledgeBase article talks about an error that includes the same type of message.

 

Best Regards,

Bryan H.
0 Kudos
Message 2 of 5
(2,754 Views)

Hi Bryan H.

 

Thank you for your reply.

I read the Developer Zone Article but still I get some difficulties with understanding the inputs to the buffer.

 

As you can see in the Picture attached (MAX Advised Rate) the Advised Rate for channel #3 at Card #3 at the controller SARAF-BM is 100ms.

As you can see in the Picture attached (SV Properties) there is a buffer size = 50 enabled in 'variable1' and he is bounded to channel #3 (at Card #3 at the controller SARAF-BM).

Does these settings lead a filling of the buffer of the SV at the rate of 100ms ?

Is there a difference in that rate if the SV is deployed on the Host rather than at the Target ?

 

Sincerely Yours,

Amitai Abramson

Download All
0 Kudos
Message 3 of 5
(2,742 Views)

Hi again, 

 

I found the following :

"Advise Rate: In the background, the FP Advise function polls the module at a set interval until there is a change. Once a change in value is detected, the FP Advise function returns the changed value to the FieldPoint Server."

 

So I am trying to understand the path that the information goes through, see the picture attached.

Where does the Shared Variable Engine of the controller is located ?

 

Sincerely Yours,

Amitai Abramson.

0 Kudos
Message 4 of 5
(2,718 Views)

Hi Amitai,

 

The update rate does not change if it is hosted on the target or the host.  It is the same.  

 

The update rate can be changed.  The minimum is 10ms.  Also not that if the value of the variable does not change then the FieldPoint does not update the value.

 

KnowledgeBase: FieldPoint OPC Server Update Rate has a good diagram showing how the shared variables are updated on the FieldPoint.

 

Best Regards,

Bryan H.
0 Kudos
Message 5 of 5
(2,682 Views)