LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can not send command via VISA test panel in MAX

Solved!
Go to solution

Hello all,

 

I am having a small issue using the VISA test panel in MAX.  I am trying to send a simple command to a device and then retrieve the response data.  I am able to do this successfully via Labview, but for whatever reason I can not get a good response in MAX.  The command that I am sending is simply a letter (address of the device) followed by an end of line character (\r\n in ascii).  In MAX, I simply append the \r\n onto the string sent in the buffer (Send End on Writes == FALSE).  All serial settings are the same as what I have in LV (19.2, 8-n-1).  Does anyone have any thoughts?  This is kind of frustrating as I just want to do something simple and don't want to have to build a whole routine in LV to do this.

 

Cheers, Matt

0 Kudos
Message 1 of 5
(3,360 Views)

I can't get an error unless I read the buffer dry. What error are you getting? Timeout? Clear the buffer and hit the other Clear button, then hit Write then Read. That doesn't work?

Richard






0 Kudos
Message 2 of 5
(3,349 Views)

Thanks, Broken.  I am getting a time out error.  Clearing the buffers doesn't seem to be making a difference. This is baffling to me.  I must be missing something fundamental.

 

Something that I didn't add before is that I seem to be able to send the command via labview without a read, and then read it via MAX.  This must have something to do with way it is sending the command.  Arrrrgh!

 

Matt

0 Kudos
Message 3 of 5
(3,341 Views)

Have you tried using a loopback? That would rule out any idiosyncrasies between your gear and the timing/protocol differences between your LabVIEW ap and MAX.

Richard






0 Kudos
Message 4 of 5
(3,334 Views)
Solution
Accepted by topic author cirrusio

Whoops!  User malfunction.  I was so positive that I was sending an end of line constant that I didn't look closely at my own code.  Turned out, it was a new line!  Duh!  Thanks for trying to assist with this Arrow.  Sorry to waste your time.

 

Cheers, Matt

0 Kudos
Message 5 of 5
(3,323 Views)