07-17-2013 02:38 AM
Hello,
im using the NI-VISA for c#.
I have to set the VI_ATTR_SUPPRESS_END_EN Attribute to false in order to get my query with an instrument working.
I have already checked it with MAX and its working perfectly. In MAX there is a checkbox on the VISA test panel to change this property.
Unfortunately i can't find a "VI_ATTR_SUPPRESS_END_EN" property of my TCPIP MBSession Object in my Visual Studio - C#.
There are lots of properties but this one is missing!!! 😞
Why is it missing? What else can i do to set this attribute?
Thanks in advance!
07-18-2013 12:42 PM
take a look at the NI VISA manual page 3:104 it has some information you can use. http://www.ni.com/pdf/manuals/370132c.pdf
10-23-2013 10:31 AM
Hello,
I'd like to ask if there has been any resolution on the post. I looked at the attribute details in the VISA Programmer Reference Manual - but the manual does not mention how the attributes are mapped to properties in .NET Measurement Studio.
I am having the same problem. I cannot seem to access the VI_ATT_SUPPRESS_END_EN attribute from my C#.NET environment. Many of the other attributes are exposed through properties on the MessageBasedSession, but I don't see any property to expose the Suppress End On Reads. Is this attribute accessible via properties in .NET?
Thanks,
James
10-23-2013 11:13 AM
After a little more digging, I noticed that there are some public methods on Session to directly access VISA attributes. The tricky part is that they are decorated with the [EditorBrowsableAttribute(EditorBrowsableState.Never)] attribute, which hides them from Visual Studio Intellisense. This solved my problem:
session.SetAttributeBoolean(AttributeType.SuppresEndEn, false);
where session is a MessageBasedSession object
Thanks,
James
08-14-2015 09:39 AM
@jmckee wrote:
After a little more digging, I noticed that there are some public methods on Session to directly access VISA attributes. The tricky part is that they are decorated with the [EditorBrowsableAttribute(EditorBrowsableState.Never)] attribute, which hides them from Visual Studio Intellisense. This solved my problem:
session.SetAttributeBoolean(AttributeType.SuppresEndEn, false);
where session is a MessageBasedSession object
Thanks,
James
Thank you for this information.
I needed to set this property to enable communication with a piece of equipment with Telnet port.
03-14-2018 08:15 AM
Hello,
I have the same problem as discussed in the original post. That means i also want to set the VI_ATTR_SUPPRESS_END_EN attribute to false in order to get my query with an instrument working. I'm using NI-VISA .NET API instead of VisaNS. Does
session.SetAttributeBoolean(AttributeType.SuppresEndEn, false);
only work for VisaNS (session is a MassageBasedSession)? How can i solve the problem when using NI-VISA .NET API? I cannot call "SetAttributeBoolean" in my C#.Net environment.
Thanks in advance,
Rene
03-14-2018 12:02 PM
Try:
((INativeVisaSession)session).SetAttributeBoolean(NativeVisaAttribute.SuppressEndEnabled, false);
03-29-2019 08:18 AM - edited 03-29-2019 08:20 AM
Hi,
unfortunately I have the same issue. I need to set "Suppress End on Reads" in my c# programm. Using MAX the communication works and I get no timeout issue, but how to reset Suppression in C#.
I start my session with
mbSession = (MessageBasedSession)rmSession.Open("TCPIP0::192.168.8.80::2268::SOCKET");
using NationalInstruments.Visa.
Maybe somebody can give me a hint how it will work.
Thank you very much.
03-29-2019 09:10 AM
Hi again,
I just noticed that VISA Interactive Control will also work fine if I enable the termination character. But Unfortunately this don't change the situation with my programm. I add the lines
mbSession.TerminationCharacter = 0x000A; mbSession.TerminationCharacterEnabled = true;
But have still the same timeout exception at the read command.
03-29-2019 09:53 AM
Hi,
ok, got it. I have to add
mbSession.SendEndEnabled = true;
as well to solve my problem. This has nothing to do with the VI_ATTR_SUPPRESS_END_EN Attribute but I post my result here to provide some new ideas for someone having the same issues.