From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ASCII code and problem with VISA read

The serial port configuration seems to be ok. To help you troubleshoot I would suggest you remove the while loop and the event structure and just try to do a single read.

 

Have you tried just sending the following string: STATUS_?

 

Ben64

0 Kudos
Message 11 of 19
(755 Views)

I tried with a simple write and read and also different form of writing but still there is the sam error.

0 Kudos
Message 12 of 19
(747 Views)
Earlier, you said you did not check with the c program. You truly have not run the program provided by the vendor? You've only tried your LabVIEW code? If that is true, then besides the incorrect (CR), you could have several problems, including using the incorrect type of cable.
0 Kudos
Message 13 of 19
(739 Views)

Time to break out hyperterminal and see if you can send commands that way.

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 14 of 19
(733 Views)

You might as well start NI I/O trace (NI-SPY) while debugging.

 

Ben64

0 Kudos
Message 15 of 19
(727 Views)

It seems the problem is with cable as I checked with hyperterminal and shows error. I will check with another cable...

0 Kudos
Message 16 of 19
(709 Views)

Make sure you use the type of cable that goes with your hardware (null modem?).

 

Ben64

0 Kudos
Message 17 of 19
(687 Views)

@sam009 wrote:

It seems the problem is with cable as I checked with hyperterminal and shows error. I will check with another cable...


What was the error?  A cable issue would be about in the middle of the list of things I would check at this point.  If you are absolutely certain that the comm settings are appropriate, then the next thing I would suspect is command syntax.  In fact, I just read the manual now.  Look at table right above section 10.2.2.  Admittedly, it is a crappy chart - I've never seen a hex number notated with a capital "H" before - but it is telling you that a CR = 0D wich is an ASCII carriage return.  That doesn't mean that you send the string "0D" with your command instead of the (CR).  Check out this link to see how to implement this.

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 19
(684 Views)

Thanks all of you,

your comments were very useful I could solve the problem by all your help. I changed the cable and little bit change in the command code. (CR) replaced by \r . Now program is running.

Message 19 of 19
(668 Views)