01-18-2022 11:27 AM
There are almost no examples or tutorials available for LabVIEW with C#/.NET and the ones that are out there are for Measurement Studio. Even those are VERY basic "How to make Sine Wave" type of thing and don't cover advanced topics like timing and synchronization. I think NI assumes anyone working with C# is a high level .NET programmer and just needs a driver to add DAQ into their code. Here are some links where you can find more info and a neat blog that walks you through using DAQmx with C# in a Windows Form App.
Using DAQmx in Visual Studio .NET With or Without Measurement Studio - NI
NI-DAQmx, NI-VISA and NI-488.2 .NET Example Locations - NI
01-18-2022 12:42 PM - edited 01-18-2022 12:45 PM
I finally found the file location of the Examples that ship with Measurement Studio in Win10:
C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNET4.5.1
You could download Measurement Studio and try to open the examples without activating it or just contact NI and see if they are available to download somewhere. I thought they were but can't find them and don't know if they are proprietary or not. Again, they are NOT examples of making a complete application. They are very simple WinForms Solutions that generate a waveform, or read an array of temperature data, etc. I forgot they were there since I want similar examples for WPF and have never found any. 😞
You may need to set up your IDE (Visual Studio?) with the proper references and such but hopefully a template or two will at least get you started.
EDIT: Almost forgot! You WILL NEED Visual Studio Professional (~$500) to use Measurement Studio. It will not run on the Community edition. I know you don't want to use it but just wanted to warn you. 😉
01-18-2022 03:21 PM
After a little digging I found many more examples in the Public/Documents folder including a few for WPF which are a big help to me 😁 so I thought I would share in case anyone else is having the same trouble. They are simple but well written.
C:\Users\Public\Documents\National Instruments\Measurement Studio\Examples\DotNET\v4.5\UI.WPF.Controls
It looks like NI is trying to copy most of the LabVIEW examples in C#/VB which is great! I hope they keep it up for Visual Studio 2022...
07-22-2024 12:03 AM
Is there any one who is doing this work in python by using nidaqmx library?