01-24-2012 10:56 PM
Hi
I am using NI PCI-5105 digitizer. I have already configured the digitizer setting and acquired data using LabView according to my need. I have posted the vi I used for the process. However, I need to do the same thing with C# using visual studio. I am new to C# and I just have basic concept about it. So please help me do this. I have both Visual Studio 2008 and 2010 installed but I have installed Measurement studio 2010 evaluation version only. Can anyone provide me a sample code and also step by step instruction to use the niscope in visual C#? Please help me with this...
01-25-2012 03:58 PM
Hi Paritosh,
I would first familiarize yourself with the NI Scope Functions. Look at the NI High-Speed Digitizers Help and navigate to Programming -> Reference -> NI-Scope Functions Reference Help -> Functions. The online version can be found here. In this section of the help, you will be able to look up expected behaviour of each function and the parameters they require. If you look closely the functions, they closely resemble similar VI's in your code that utilize the NI Scope drivers.
Similarly, you can find tons of examples if you navigate to Start -> Program Files -> National Instruments -> NI-SCOPE -> Examples -> C.
Jason L.
01-25-2012 11:30 PM
I tried few examples for dotnet 3.5. The configured acquisition and fetch forever. They are working fine. What shall i do to merge these examples and change the way I need to? Can you give me some examples similar to my need? Please help.
01-26-2012 12:50 PM
HI Paritosh,
We generally don't write code for customers. If you look at the GenericConfiguredAcquisition.c file that is in the common directory (Start -> Programs -> National Instruments -> NI-SCOPE -> Examples -> C -> common) that the ConfiguredAcquisition example calls and compare it to the GenericFetchForever.c that the FetchForever example calls, you can see that in the GenericConfiguredAcquisition.c file that you are configureing parameters manually starting from around line 65 and also you declare relavant variables above.
Similarly in GenericFetchForvever.c you can see that you are configureing a software trigger instead of prompting the user to configure the trigger. In order to fetch forever, the example configures a software trigger but never triggers and instead pulls values off of the buffer. Using this knowledge you should be able to embed the fetch forever functionality into any code. I think with this information and examples, you shouldn't have too much problem combining the functionalities of both codes.
Jason L.
01-26-2012 10:49 PM
Is it the same for cs files as well? Can you give me some instruction on merging the cs file as well? and also I need an external trigger in the code, how can i be able to detect the external trigger? Do i need to use any other example files?
01-27-2012 01:47 PM
02-01-2012 08:45 AM
Hi
When i run the "Configured acquisition.cs" a different GUI used to come showing the wavefrom graph and acquiring data only once. Now from yesterday, from the same program, a different GUI is appearing which I've attached here. How can I get old GUI and interface back for configured acquisition.
When I fetch the data using multifetch, can I directly do mathematical operations with the data (like averaging) or do I need to save the data first. Also, the 1st link you've given is not working. Please help.
02-01-2012 08:52 AM
Paritosh,
Sorry, the first link goes to this KB here: http://digital.ni.com/public.nsf/allkb/D139037C4D9744B48625743C0077885F?OpenDocument
Jason L
02-01-2012 09:03 AM
And can u give me a solution for the problem I am having with configuired acquisition.cs? Is the attached GUI a desired output of the "Configured Acquisition.cs"? I used to get different GUI with the waveform as well. Please help.
02-01-2012 11:28 AM
HI Paritosh,
Did you change anything (software/updates?) on your computer from the time the GUI changed? What veresion of Scope are you using? Also, which configured acquisition.cs file are you using? Can you give me the path for the file?
Jason L.