ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

need help on DataScoket auto read updates in labview

I am developing a server and a client application. These two talk via the NI DataSocket. For a control on the server side, both applications can reset the value. I need to find a way of AutoReadUpdates. I found the VB API but not the Labview functions. Can some one tell me if there are Labview functions for auto read updates? Thanks
0 Kudos
Message 1 of 4
(3,138 Views)
You can use front panel data socket to auto update controls. Right click on the control >> data operations >> datasocket connections . When properly configured, the control will reflect the most recent value posted.

You may also want to dig around the website. I recommend the following search page for its breadth.
http://search.ni.com/?col=alldocs&layout=TechResources&ql=a
0 Kudos
Message 2 of 4
(3,138 Views)
Jermy,
Thanks for answering my question. The front panel has been configured to reflect the most recent value posted if the change is made from the server side. My problem is, the client application can also make changes to the controls on the server application. Wen that happens, I will have to know what to do with the change. If the requestor is the server, no extra coding is needed. The front panel configuration will take care the change. However, if the client is the requestor, I will have to update the front panel value via pulling. This generates a problem. If changes are made from both ends, depends where you are in the loop. No telling whos requests get taken first. It appears the operation is not stable. I was hoping there is an AutoRea
dUpdate function that can detect the change from the client side and notify the server side with the change so its front panel value can be set to the new requested value from the client side. Any thought on how to do this?

Thanks
0 Kudos
Message 3 of 4
(3,138 Views)
I am still a little unclear of the details of your application. Are you using front panel datasocket? This causes an led to show up on the front panel to indicate whether the connection is good. Front panel datasocket should update all the controls without the need of polling. If you need to know what application has just made the change, pass the data as a cluster. You can also use the set attibutes to add the application info. This is how I would go about changing a working application to pass more information about the data being sent.

If you are concerned with losing post to datasocket, then that is how datasocket works. You might consider using VI server and a queue to store the values until you can process them. Plus this way yo
u will only need to push into the queue when the value changes.

You may find the core data socket VIs useful. This would be useful to adapt a VI using datasocket in the block diagram. They are located in the ...\labview\vi.lib\platform\dataskt.llb
There is a VI called data updated.
0 Kudos
Message 4 of 4
(3,138 Views)