Jump to content

VISA Read Ignores 0x00


MSpidey

Recommended Posts

Hello fellow Labview users,

I am building a GUI using Labview to display the status of a microprocessor circuit I am building. The data is being sent via a serial link from the microprocessor to the computer with my GUI. I am using VISA Read to bring the data in. I am able to get all the information I need across unless I try to send the byte 0x00. Any zeros bytes are ignored by the VISA Read completely. Shown in the two images attached are the VISA Configure Serial Port setup I am using as well as how I am bringing in the information with VISA Read. I will also include the vi but I imagine that it would be somewhat difficult to understand what I am trying to do as I haven't used Labview much so some of my setup is pretty weird. :( Basically the system continually reads in one byte from the serial port and checks to see if it is equal to 0xEB. When it finds 0xEB it then looks to see if the next one is 0x90. If it is as well, then the system knows that the next 8 bytes are valid information and the data is processed accordingly. I actually haven't finished the data processing part completely because I need it to be able to read 0x00 for some of the cases so any code after that point can be ignored. I can tell that the VISA Read is ignoring 0x00 because I have it set to read in the next 8 bytes after it syncs and so far whenever there is a 0x00 it picks up the last byte as being 0xEB or the beginning of the next string. Any help would be greatly appreciated as I have been working on this for a few days now and have no idea what to do to resolve it.

M Spidey

Link to comment

QUOTE (BobHamburger @ Jun 29 2008, 01:32 PM)

Wire up a Property Node to your VISA refnum. Look for Properties>>Serial Settings>>Discard NUL Characters, and set it to False.

Hey Thanks, this was exactly what I was looking for. Unfortunately it helped me figure out that the MSP430 won't send 0x00 so it still doens't work but at least I know it isn't Labview. Thanks again.

Link to comment
  • 2 weeks later...

QUOTE (MSpidey @ Jul 1 2008, 11:20 AM)

Hey Thanks, this was exactly what I was looking for. Unfortunately it helped me figure out that the MSP430 won't send 0x00 so it still doens't work but at least I know it isn't Labview. Thanks again.

Are you sure it is the MSP430 itself. I would expect problems with C runtime libraries that use string formatting to format data to be sent over a serial line but the low level interface hopefully doesn't care about such details.

Rolf Kalbermatter

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.