Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Visual Basic and DataSocket

I have the following problem:

A LabVIEW server application, on client request, take some signals measures
from various struments. After, using DataSocket, it sends a response,
containing the misured signals, to a client.
The client request is send as a cluster transformed into a string using
Flatten To String.VI, and server response is send in the same way. The
client and the server applications know how read this data using Unflatten
From String.VI wiring the right "type" parameter.
When the client was running as LabVIEW application there was no problem.
The problem is happened when i thinked to transform the client as Visual
Basic application using Component Work: now i don't kwow how translate the
client request and transla
te the server response in the correct format
without change the server application.

There is anybody that can help me?

Thank to all.


Luigi Bulotta
0 Kudos
Message 1 of 2
(3,914 Views)
Luigi,

Since there are no functions to flatten and unflatten LV strings in VB there
is no straightforward solution to your request. You can either do the flattening
and unflatteing yourself by studying the flattened string format described
in the LV manuals, or rewrite the LV server application to send the data
in format more suitable to VB. DataSocket supports its own version of hierarchical
data using data attributes. Each data object (CWData)contained in a DataSocket
object (CWDataSocket) can have any number of named attributes. Each attribute
can also be of any data type including arrays, etc. You can read and write
these attributes easily in both VB and LV using the provided DataSocket functionality.

I hope this helps,

Christian
former CW developer

"Luigi
Bulotta" wrote:
>I have the following problem:>>A LabVIEW server application, on client request,
take some signals measures>from various struments. After, using DataSocket,
it sends a response,>containing the misured signals, to a client.>The client
request is send as a cluster transformed into a string using>Flatten To String.VI,
and server response is send in the same way. The>client and the server applications
know how read this data using Unflatten>From String.VI wiring the right "type"
parameter.>When the client was running as LabVIEW application there was no
problem.>The problem is happened when i thinked to transform the client as
Visual>Basic application using Component Work: now i don't kwow how translate
the>client request and translate the server response in the correct format>without
change the server application.>>There is anybody that can help me?>>Thank
to all.>>>Luigi Bulotta>>>
authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
0 Kudos
Message 2 of 2
(3,914 Views)