Jump to content

Using VISA read?


kev_hib

Recommended Posts

Hi. I'm using the rs-232 port to gather data from my hardware. The hardware is a PIC microchip sending five bytes of data over the rs-232. The problem is that when I read these bytes (workes OK) and display them in an array, they have "strange" values.. Seems as Labview believes they were signed bytes when they arrived, so I get the wrong data out.... I send 36dec and recieve 163dec... Any tips to how I can get the "correct" values? Because I do not send signed bytes of data, they are unsigned from the PIC. I then ofcourse get a problem recieving the bytes out of the range -127 to 128...

Link to comment
  • 2 weeks later...

If your VISA output from RS-232 is of type string as I suppose, your problem is at the converting the read string to decimal value.

Pay attention to the representation (U8 in your case) of your indicators and work with the "number to boolean array" to check whether you have the conversion made correctly.

If this does not help with your problem, please provide more information. Especially the LV version you are using and perhaps a screenshot of your diagram as well.

Attached picture shows some simplified suggestions as to how to go on debugging your problem.

post-21-1084467812.jpg?width=400

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
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.