LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help preventing VISA Read from interpreting value at port

I'm properly embarrassed that I forgot you said you ewre receiving ASCII values.
Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 11 of 27
(1,157 Views)

In an earlier version of LV the Init serial port VI was funky and did not shut-off the term character for both transmit and recieve. Post an image of that VI so we can see the term character is indeed being disabled.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 12 of 27
(1,149 Views)

Ben:

 

You are on a roll; I have a flat tire today.  Perhaps I'll just READ stuff today.  😉

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 13 of 27
(1,147 Views)

Ben,

 

Attached is Block Diagram for the Config Serial Port block.

0 Kudos
Message 14 of 27
(1,128 Views)

Provided the false state says "none" we are OK there.

 

Now to the other odd thigs.

 

Two stop bits?

 

Odd Parity?

 

Make sure those are correct (you probably did).

 

Try watching your serial port using NI Spy to try and get more info. if you theory is correct we may see more in the NI SPy log. Along with that, if you use a property node on the VISA sesion you can check for the number of bytes at the port AFTER you read the two you expect.

 

SO I can't tell you what the problem is but maybe one of those ideas will shake the tree a litle.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 15 of 27
(1,112 Views)
Sorry I responded to the wrong thread!
Message Edited by billko on 08-26-2009 03:19 PM
Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 16 of 27
(1,108 Views)

I've been thinking about this a bit.  What if, by directly translating the output string to an array of U8s, it interprets the "/" as the start of a control character  you know /n would be a return, I think???  Every time the VI encountered a "/" it would take the next character and make a single control character out of it, making your reads off by one.

 

I'm thinking maybe you can split the string up into the individual characters before translating them into U8s.

 

Bill

Message Edited by billko on 08-26-2009 04:29 PM
Message Edited by billko on 08-26-2009 04:36 PM
Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 17 of 27
(1,091 Views)

billko wrote:

I've been thinking about this a bit.  What if, by directly translating the output string to an array of U8s, it interprets the "/" as the start of a control character  you know /n would be a return, I think???  Every time the VI encountered a "/" it would take the next character and make a single control character out of it, making your reads off by one.

 

I'm thinking maybe you can split the string up into the individual characters before translating them into U8s.

 

Bill

Message Edited by billko on 08-26-2009 04:29 PM
Message Edited by billko on 08-26-2009 04:36 PM

I tried this:

 screen1.jpg

 

and got this!

 

screen2.jpg

 

I think I'm right...except in the original post, i got the slashes mixed up.

 

Bill

Message Edited by billko on 08-26-2009 04:56 PM
Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 18 of 27
(1,084 Views)

Bill,

 

You gave me an idea of something to check tomorrow when I go into work.  I'll keep you posted.

0 Kudos
Message 19 of 27
(1,072 Views)

Nice, Am0n - good luck!

 

Darn it, I forgot to mention:

 

I checked <'/' Codes Display> on the string constant right-click menu because termination strings being ignored, they are coming through as characters now.

 

Bill

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 20 of 27
(1,069 Views)