LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ascii data from my serial port does not represent the data I am really receiving

Solved!
Go to solution

I created a program that sends data to a serial port and then recives new data. I send and recive data as ascii charicters however some of the ascii charicters I am reciving are not what they seem, my serial port monitor tells me that " “.... " equals " 93 00 00 00 1c " in hex. (it also says " 93 00 00 00 1d" is the same) how do i convice my serial reader vi to give me realevant data?

 

 

Fan Controller Screen Shot.jpg

 Serial Monitor.jpg

__________________________________
| (^) (^) |
| ( o o ) |
| (") '''' (") Magic Code Bunny ^.^ |
| ( ) |
| (m)---(m) |
|_________________________________|
0 Kudos
Message 1 of 18
(3,944 Views)

It looks like you use the old* Serial drivers. I suggest you move to the VISA system.

Is the Dumpview your program? Your diagram diagram does not show a write function or 'equals' function so I don't know how I can help you.

 

 

 

Ton

 

PS as in really old and might be obsolete once.

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 18
(3,940 Views)

Im using lab view 6.1, I tried to use VISA but I cant find the COM3 port I'm using. No drop down menu appears when i place a VISA Resource Name control.

The dump view is from a serial port monitoring program (not labVIEW) and shows the output of my program as well as the responce from the divice I am sending info to.

Here are some examples of the problems I encounter.

 

Visa Paradox.jpg



























Visa Code.jpg




















Error code from visa.jpg
__________________________________
| (^) (^) |
| ( o o ) |
| (") '''' (") Magic Code Bunny ^.^ |
| ( ) |
| (m)---(m) |
|_________________________________|
0 Kudos
Message 3 of 18
(3,922 Views)
Did you install NI-VISA?
0 Kudos
Message 4 of 18
(3,917 Views)

I think that version of LV needed an entry in "Visaconf.ini" for it to show in the drop down list.

 

Is the number of bits set right?

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 18
(3,904 Views)

So is the issue that LabVIEW is not reading the 1D and 1C, or is not writing them?

 

Note that 1D and 1C are field/file seperators

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 6 of 18
(3,899 Views)
The issue is, Labview receives “.... which I cannot do anything useful with. At some point my computer receives 93 00 00 00 1c from COM3 but I do not have access to that info through labview for some reason
__________________________________
| (^) (^) |
| ( o o ) |
| (") '''' (") Magic Code Bunny ^.^ |
| ( ) |
| (m)---(m) |
|_________________________________|
0 Kudos
Message 7 of 18
(3,891 Views)

Try right-clciking on your indicator anc choose "slash codes" or "Hex".

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 18
(3,881 Views)

Where are you seeing the "....   ? That is what your dump program is displaying, and if you have the output of your serial read connected to a string indicator it may well show that as well, as the returned "numbers" (actually bytes) aren't displayable characters. If you do have a string indicator showing the returned data, have you "right clicked" on it and selected "hex display"?

 

 

I see Ben typed faster that I did!

Message Edited by LV_Pro on 06-11-2010 02:53 PM
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 9 of 18
(3,877 Views)

LV_Pro wrote:

...

 

I see Ben typed faster that I did!

Message Edited by LV_Pro on 06-11-2010 02:53 PM

Kudos to you Putnam for confirming my post before you saw it.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 10 of 18
(3,873 Views)