0

This is my first question here. I have a problem with the termination character when sending a message on the GPIB Default character is line feed and my instrument needs a carriage return.

I ́v tried to change it but when I sniffing at the bus it is still line feed. Anyone knows what I ́m doing wrong?

EDIT: As I understand instrEprobe.IO.TerminationCharacter only affects the receiving message from instrument but I need to send message with carrage return and not line feed

BR Niklas

Public Function InitEprobe(ByVal strGpib As String, ByVal Type As String)
 ioMgr = New Ivi.Visa.Interop.ResourceManager
 instrEprobe = New Ivi.Visa.Interop.FormattedIO488
 Try
 Dim Out As String = ""
 instrEprobe.IO = ioMgr.Open("GPIB0::" & strGpib) 'set GPIBport
 instrEprobe.IO.TerminationCharacter = 13 ' set termination character
 instrEprobe.IO.TerminationCharacterEnabled = True
 instrEprobe.WriteString("I") 'Send command to instrument
 Wait(500)
 Out = instrEprobe.ReadString 'Read command from instrument
 Return Out
 
 Catch exp As Exception
 Return exp.ToString
 End Try
 End Function
asked Sep 24, 2021 at 9:42
4
  • 1
    Is instrEprobe.IO.TerminationCharacter supposed to be an integer, or a char or string? Commented Sep 24, 2021 at 9:46
  • It shall be an integer. I can in debug mode see that the varible is set to 13, but still line feed when using N/I io trace Commented Sep 24, 2021 at 11:05
  • This looks like a similar issue stackoverflow.com/q/32120946/832052 Commented Sep 24, 2021 at 16:20
  • Unfortaintly, I dont find a solution in that issue Commented Sep 27, 2021 at 13:48

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.