LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial communications and the change of numbers to characters

Hi Ben,

 if you are convinced that the data is being sent as numbers than as I suggested in my previous post, use a type cast to get the data from the string directly to a number.  Have a look at the attached vi.

regards

Peter

 

 

0 Kudos
Message 11 of 17
(1,506 Views)
I am sorry I can't view this file because the newest version of labview I have access to is 8.0 and the program is written in 7.0.  Can you explain what you are talking about?
0 Kudos
Message 12 of 17
(1,497 Views)
By program I mean the one that I wrote. Yours is in a newer version.
0 Kudos
Message 13 of 17
(1,497 Views)
 
I don't have easy access to 7.0 so this I saved it as v8.0.  You may have to do some c style byte or word handling of the data to get it into the format you need but a simple cast as shown in the vi will give you a picture of what may be happening.
 
Good luck with it. 
 
cheers
Peter
0 Kudos
Message 14 of 17
(1,493 Views)

I still think it's a parity problem. I wrote a odd-parity generator and applied it to the digits, getting the result seen. (This follows your descriptions - the 'incorrect' characters have the MSB set) Stripping the parity bit back off gets back to the original characters.

Try setting the LabVIEW serial port to SEVEN data bits and odd parity. This is what I assume the Red Lion kit is using. If you set the LV to 8+parity it will (probably) interpret the parity bit from the Red Lion as the top data bit. Of course if you can change the Red Lion / converter settings, it would be equally effective. All that really matters is that both ends are set to EXACTLY the same characteristics.

However if you can't solve it in hardware / settings [the better way] you could try a software fix. Simply mask out the top bit of each character in the string. Here's one way to do it.

Hope this helps,

Rod.

 

Message Edited by Rod on 07-13-2007 11:35 AM

Download All
Message 15 of 17
(1,479 Views)


bwilli39@utk.edu wrote:

I am controlling 4-Red Lion T48 controllers and 2-Red Lion PAX meters
... 
I do however have the serial port set to the odd parity and 8 bits. The red lion hardware is also set to odd parity.


Kudos for Rod.  I too think serial settings should be checked. 

Unless things have changed recently with RedLion's PAX and T48, they always transmit data as ASCII characters. 
And while the PAX might be configured with 8 bits/Odd parity, I don't think that is an option for the T48 (JPG of manual attached). 

Both the PAX and T48 ignore the parity bit on incoming messages.

=====================================================
Fading out. " ... J. Arthur Rank on gong."
0 Kudos
Message 16 of 17
(1,451 Views)

Hi all,

13 years later I am facing similar issues with the Red Lion PAX.

I found the parity issue answer in the manual found in this post: 

 

https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Having-a-problem-interfacing-my-Red-Lion-PAX...

 

Micael__0-1592383877508.png

I you set the device to 7 data bits / 1 stop bit / no parity, you should set 2 stop bits for the VISA session.

 

Cordialement,


Micaël DA SILVA
0 Kudos
Message 17 of 17
(884 Views)