Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Support for Visual Studio 2017

Solved!
Go to solution

When will National Instruments release versions of DAQmx and Mesurement Studio for Visual Studio 2017?

I had to install Visual Studio 2013 on a new System to get the libraries, examples and help files.

And make the procedure http://digital.ni.com/public.nsf/allkb/F01DDED92E62447286257F5E0071048D

Why we pay Developer Suite subscription and get no update?

 

Message 1 of 28
(14,387 Views)
Solution
Accepted by topic author Peter_S

Hi Peter,

 

My name is Collin Draughon and I am the product manager for Measurement Studio. We made a difficult decision last year to prioritize ensuring we had best-in-class .NET APIs for our hardware devices over releasing a Measurement Studio 2017 that supports Visual Studio 2017. We did this because we want to consistently promise to our customers that their experience working with our hardware in .NET is the best experience available. I want to sincerely apologize for any inconvenience we introduced with this prioritization but also want to reinforce that National Instruments is dedicated to making Measurement Studio the best Visual Studio add-on for engineers in the market and we have a long roadmap of features we want to add moving forward. We intend to support Visual Studio 2017 and 2015 in the next release of Measurement Studio which will should be available in a few months through our beta program at ni.com/beta. Feel free to email me at collin.draughon@ni.com for more details! 

 

As for support of DAQmx in Visual Studio 2017, the readme, http://download.ni.com/support/softlib//multifunction_daq/nidaqmx/17.1.1/readme.html, signals support for .NET framework 4.5.1 which you are able to target in Visual Studio 2017: https://msdn.microsoft.com/en-us/library/bb398202.aspx. Therefore, you should be able to use it without issue. 

 

Please let us know if you have any other questions.

 

Regards,

 

 

Collin D.
Software Product Manager
Message 2 of 28
(14,345 Views)

I agree - We need better support for visual studio !!!

Message 3 of 28
(14,089 Views)

I suspect the problem I am experiencing is unrelated to the support for Visual Studio 2017, but as I am using it as my development platform and just installed the NIVISA1700 package, I thought I would throw this out here and see what type of support is forthcoming.

 

I have written a Windows Forms App(Net Framework) Visual Basic program using the National Instruments assembly extensions. The interface is a USB serial adapter connected to an amateur radio transceiver  to manipulate the device's internal memory via RS232 serial data strings. I am able to write data to the radio, but am unable to read the data due to a timeout exception being thrown. However, the NI utility NI IO Trace used in conjunction with NI-VISA Interactive Control or my application does capture the returned string. My question is, "How do I read the Read input buffer?" I have written an exception to the exception in my code. See the screen shots below as an illustrationTimeout Exception within VS2017Timeout Exception within VS2017Application trace (see line 136&137)Application trace (see line 136&137)

I can see it, but I have not figured out how to access it programmatically.

 

The IOTimeoutException Constructor(Int64) identified within the NI-VISA .NET Class Library Help document seems to address this as the actual data argument, but I am unable to use the 64Bit version due to warnings of instability being raised by the compiler. Is there another method available in the 32bit environment? As the application employs the MessageBasedSession type would it be suggested that I employ the DisableEvent method to ignore the timeout exception? As this may get into a discussion on how to handle exceptions, I will suggest reading  the excellent article, Customizing a C Series Example Program for Wireless Data Acquisition

found in the document section of this community in which the author explains in the  Programmatic Error Handling section a variety of workarounds for this particular problem ; however, the example is written for a LabView environment.

 

As a programmer of limited skills I wish the SerialPort1.ReadLine worked. The solution to  strResponse = mbSession.RawIO.ReadString may be resolved by the same fix. Any suggestions will be appreciated - the more simple the better.

 

 

Message 4 of 28
(13,868 Views)

If you are instrested, there's a company developing free and open-source C# controls and algorithms for T&M industry, as well as many native C# drivers. You can visit http://www.jytek.com/ to download them. Good support for both VS 2015 and VS 2017.

0 Kudos
Message 5 of 28
(13,665 Views)

Collin Draughon

Will the releasing of Measurement Studio 2017 that supports Visual Studio 2017 also be available for Windows 10?

0 Kudos
Message 6 of 28
(13,575 Views)

@DCDowns wrote:

I suspect the problem I am experiencing is unrelated to the support for Visual Studio 2017, but as I am using it as my development platform and just installed the NIVISA1700 package, I thought I would throw this out here and see what type of support is forthcoming. 


It indeed is! Your problem is the termination character! If you had posted this as a new topic, it would have been more likely that you received a reaction before this one.

 

viRead terminates on 4 conditions:

 

- an error occurred in the underlying driver

- the configured termination character for this session was received

- the number of requested characters/bytes was received

- the configured timeout for the session has expired

 

So the solution is not to disable the timeout exception but to avoid it. From the two options that remain (an error is also not a desirable option nor would it help in any way as it will be simply throwing a different exception) you do not really want to change the number of requested bytes as that makes your software very depending on the actual message that device returns. Instead you want to either cause the instrument to issue the same termination character as what VISA is by default waiting for for ASRL (serial port) resources, or reconfigure the termination character for the current VISA session. It would seem that your device tries to use the termination character that you use in your command that you send, or maybe it really uses the semicolon as such. So find out what it is.

If the device is adaptable you can try to append the carriage return character  \r and/or line feed \n to your command you send to the device. VISA by default should terminate reads on \r for serial port resources.

So if you can make your device to append this character to the end of the answer you should all be done.

Alternatively you can add something like this to your code before you start communicating with the device:

 

.....
/* Initialize the timeout attribute to 10 s */
viSetAttribute(instr, VI_ATTR_TMO_VALUE, 10000);
/* Set termination character to carriage return */
viSetAttribute(instr, VI_ATTR_TERMCHAR, ';');
viSetAttribute(instr, VI_ATTR_TERMCHAR_EN, VI_TRUE);
/* Don't assert END on the last byte */
viSetAttribute(instr, VI_ATTR_SEND_END_EN, VI_FALSE);
/* Clear the device */
viClear(instr);
.....

 

Rolf Kalbermatter
My Blog
0 Kudos
Message 7 of 28
(13,439 Views)

The termination character was the problem as suspected. Before i could set the termination character, i had to access the method which was not intutive. The issue is resolved. Thank you.

0 Kudos
Message 8 of 28
(13,429 Views)

I would like to chime in and let folks know that although Visual Studio 2017 is not supported by Measurement Studio, it is still possible to use Visual Studio 2017 with Measurement Studio projects and I have been doing it for the better part of 2018 without any issues. It should be noted that there is a little manual work required to get Visual Studio 2017 to show NI GUI controls and I should mention that you won't get the option to create an explicit NI project (which I believe means the license file won't get created automatically on your behalf). There are separate NI License Manager & NI MAX desktop applications that get installed with Measurement Studio on your machine so not having a Measurement Studio tab in the VS IDE with shortcuts to this stuff is no big deal. I found the following link useful in getting Visual Studio 2017 to work with my projects dependent on measurement studio: http://www.ni.com/product-documentation/54629/en/

0 Kudos
Message 9 of 28
(13,387 Views)

is there any update on this?  When is the new release of Measurement Studio coming out?

0 Kudos
Message 10 of 28
(12,777 Views)