LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView TCP decimal / ASSCII

Hi
I send from one pc through LAN via LabView tcp-client decimal numbers or characters to another pc  tcp-server which is written in java.
The communication works, but my problem is: when i send decimal 1, i receive at the server side 49, that means i get at my server the ASSCII code for decimal 1 which is 49.
Cna somebody helpme please?, i dont know what should i set or change that the LabView send the right character or number wich i desire?
Thank you very much
Kami
0 Kudos
Message 1 of 3
(3,114 Views)

The anwer is YES.  You should expect to get this response.  Convert the Dec back to ASCII.  I don't think it is a mode.  TCP sends strings so it depends on how you convert your numbers before you send the data.

Matt

Hex  Oct  Dec  ASCII
30  060  48  0
31  061  49  1
32  062  50  2
33  063  51  3
34  064  52  4
35  065  53  5
36  066  54  6
37  067  55  7
38  070  56  8
39  071  57  9

Message Edited by mfitzsimons on 05-17-2006 11:22 AM

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 2 of 3
(3,102 Views)
The problem seems to be with your server side, not with the LV program - the LV client sends a single byte with a value of 49. The server should know how to translate this into a displayable ASCII character. You could modify your code to send out ASCII 1 instead of ASCII 49, but that wouldn't really make any sense.

___________________
Try to take over the world!
0 Kudos
Message 3 of 3
(3,096 Views)