Discussions au sujet des autres produits NI

annuler
Affichage des résultats de 
Rechercher plutôt 
Vouliez-vous dire : 

How can I configure dynamically the datasocket server hostname

I have the same LABView 'low level' application running on several hosts (e.g. host1, host2, host3)
and I would like to have a supervisor 'high level' application running on an other host (e.g host4) and
managing only one of the low level applications at a time.

To make that I use the DataSocket communication protocol and needs to have one datasocket
server running on each 'low level' hosts. Therefore for the 'low level' applications I can
configure the URLs using (e.g. dstp://localhost/value1 ).

To access one out of the three 'low level' applications with the 'high level' one,
I see only 2 solutions which are not very goods and doen't suit me:

1/ Write three similar applications with The URL configured differently:
appli number 1 --> dstp://host1/value1
appli number 2 --> dstp://host3/value1
appli number 3 --> dstp://host3/value1

==> This will be a nightmare for maintenance

2/ Not to use the configuration capabilities of the DataSocket, but getting
the datasocket hostname from an environment variable and concatenate strings to
build dynamically the URL names and open the Datasocket. Then to use LABView
'events' to read/write to/from the DataSocket when a value is changed by the User.

==> This is a better solution but it's a huge work because I have a lots
of URL to manage (not only one as given in the example above) and the
'high level' application needs to be totally re-organise.


Therefore, my question is: Is there a better solution to configure the datasocket
server hostname in order to not to have to re-organise totally my 'high level'
application and to continue to benefit from the configuration capabilities of
LABview.

Thanks
0 Compliments
Message 1 sur 2
4 512 Visites
Hello,

To change dynamically the URL of DataSocket Connexion in LabVIEW program, you have 2 solutions:

1 – Use the LV functions of DataSocket communication: Open, Write/Read, Close
To access to these functions, go to Functions Palette>>Communication>>DataSocket
And change, by programming, the input URL of the function “DataSocket Open”

2 – The other solution, simpler to implement, is to attach a DataSocket connexion to a LV object and then create a property node of that object and chose the property “DataSocket>>URL”.

I hope this helps,

Regards

Sanaa TAZI
Applications Engineer France

Sanaa T.
National Instruments France

0 Compliments
Message 2 sur 2
4 460 Visites