Ni.com is currently experiencing issues that may cause some pages to fail.
Support teams are actively working on the resolution.
Ni.com is currently experiencing issues that may cause some pages to fail.
Support teams are actively working on the resolution.
10-10-2018 08:37 AM
I'm interested in interfacing with an instrument which requires a CR and LF at the end of each message. I followed example 7 here but I get an error message telling me it times out. Can anybody offer advice as to my fault? The code is as below.
For further reference, I attempted to send the same command using termite, and with (what I believe) to be the exact same setup, I successfully read the result, as below.
Also, unfortunately the instrument does not have any feature for me to switch to a single termination character.
Thanks in advance for your help.
Solved! Go to Solution.
10-10-2018 08:43 AM
Did you truly follow that example 7 all the way down to the note in the last sentence?
Right click your string constants and make sure they say \code style. You should go to the Visible menu and make the display style visible. My guess is that you have those as normal display and you are sending a literal backslash "r" backslash "n"
10-10-2018 08:44 AM
Magic time.
Consider showing the display style on string constants;) when set to escape codes display you will find out that there is no carriage return sent .
10-10-2018 09:10 AM - edited 10-10-2018 09:11 AM
Many thanks for the very fast replies.
It turns out I didn't follow it exactly, I should have slowed down a little and been more observant. I think I've corrected it as per your recommendations, however I still get the same error, which I've attached below. I've also attached the labview code in case that would be of more use.
Fwiw, I've also attached the relevant section of the manual, but I don't think there are any surprises there.
10-10-2018 09:27 AM - edited 10-10-2018 09:28 AM
According to your manual, you need to send both the CR and the LF. The VISA Read timeout is because the equipment is just sitting there waiting for a LF that never comes. Meanwhile, your VISA Read gets frustrated sitting there waiting for a response that never comes because the equipment is sitting around waiting for the LF, and finally VISA Read just gives up.
10-10-2018 09:42 AM - edited 10-10-2018 09:46 AM
@billko wrote:
According to your manual, you need to send both the CR and the LF. The VISA Read timeout is because the equipment is just sitting there waiting for a LF that never comes. Meanwhile, your VISA Read gets frustrated sitting there waiting for a response that never comes because the equipment is sitting around waiting for the LF, and finally VISA Read just gives up.
Not exactly. The term char is enabled and a linefeed....brb ... and the handshake looks right.. but term mode for reads is term char not xoff... that looks odd