LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

flatten string function in other language

My server side program is using LV, the client will use other language, how the client read the text sent by tcp. The server use flatten string. What function should the client program use.

 

Thanks,

0 Kudos
Message 1 of 17
(3,606 Views)
I'm sorry, but your question is not clear. What do you mean by "client will use other language"? Are you referring to a spoken language or a programming language? If it's a programming language then I don't understand the follow-up question: "What function should the client program use." This is entirely dependent on the programming language. Java? C? C++? VB? ADA? Pascal? Cobol? or one of these: Little-Known Computer Languages
Message 2 of 17
(3,602 Views)

Is this question related to little/big endian problematic? Read this it will give you info about it

http://digital.ni.com/public.nsf/allkb/97332426D63630EE862565070049FFBB



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 3 of 17
(3,587 Views)

Just in server said I use the flatten string before tcp send.

 

At client side, I should use unflatten string after tcp receive, but now the client side is using c, what function should I call as the same of unflatten string.

 

Thanks. 

0 Kudos
Message 4 of 17
(3,557 Views)
If at the client side you are using C then there is no "Unflatten From String". You will have to read the bytes yourself and decode them yourself by writing your own C code. You can search the net for some examples on how to do this. 
Message 5 of 17
(3,544 Views)
When I last did this, I think I did typecasting in both the LabVIEW program and the C program. I've never used flatten to string in LabVIEW TCP/IP programs.
0 Kudos
Message 6 of 17
(3,536 Views)

I use the attached vi in server side to send the string out.

 

In the client side, received as below

 

hex

14000000 000c5443
50436c69 656e7420 524e2a90 0045

14000000 000<---no idea what is this
5443 50436c69 656e7420 524e<---is TCPClient RN
2a90 0045<---is *@@

I read the 'Type Descriptors' in the following link, but still no idea of it.

http://zone.ni.com/reference/en-XX/help/371361E-01/lvconcepts/type_descriptors/

 

Any suggestion?

0 Kudos
Message 7 of 17
(3,513 Views)
Cant see any VI


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 8 of 17
(3,512 Views)
There is no reason for you to use Flatten To String - that just makes things more complicated. Just use Type Cast as Dennis alluded to. Open the Example Finder and search for TCP/IP. You will find a Simple Data Client and Simple Data Server. Use these as a template. The C code just needs to do the same thing being done in the Simple Data Client which is quite simple to do in C.
Message 9 of 17
(3,508 Views)
0 Kudos
Message 10 of 17
(3,506 Views)