Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

6602, .NET, concepts, documentation....

The documentation I was thinking of was the NI-DAQmx .NET framework 1.1 which is full of information.  I know it can be a little overwhelming at first, but it's a great reference.  Also, the Measurement Studio Development Library also has some great resources.

Also, you can find quite a few example programs from Example Code Library.

Good luck with your application!

Micaela N
National Instruments
0 Kudos
Message 11 of 30
(3,935 Views)
Okay, I'm in the MAX looking at my "Device Routes" for the PCI-6602. It's a big matrix with yellow and green squares. Green is labeled as "Direct Route", and Yellow as "Indirect Route Through Subsystem".

1. What do these labels mean? Does green mean it's permanently connected, and does yellow mean I can connect it?

Here's why I ask: the connection between PFI30 and PFI12 is green on this matrix. Yet when I try this in my VB  code:

DaqSystem.Local.ConnectTerminals("/Dev1/PFI12", "/Dev1/PFI30")

I get the following message:

"Specified route cannot be satisfied, because the hardware does not support it. ... Status Code: -89136"

So what's the problem here? It says the same thing for any yellow ones. If I instead try "DisconnectTerminals" it doesn't complain, but god only knows what that's doing.

I'm trying to avoid any external wires. In the past we have a master counter doing a pulse train that is physically wired to the gate of other counters (which in turn are set only to generate one pulse) so that we can get a pulse train of multiple pulses delayed relative to each other. I want to replace these wires with internal connections. This has been my goal from the beginning.




0 Kudos
Message 12 of 30
(3,882 Views)
The Device Routes chart in MAX is directional, the Sources are listed on the right side and the Destinations are shown across the top.  There is a direct route between the source PFI30 to the destination PFI12, however, the reciprocal route (PFI12-PFI30) does not have a connection. 

To work, you just need to change your code to: DaqSystem.Local.ConnectTerminals("/Dev1/PFI30", "/Dev1/PFI12"). 

Hopefully that will get you going again.
Micaela N
National Instruments
0 Kudos
Message 13 of 30
(3,860 Views)
Thank you. I didn't realize connections were not bi-directional. Now it's working as expected. I still have issues with concepts; I've started a new thread for that:
0 Kudos
Message 14 of 30
(3,854 Views)

Hi

I am currently upgrading my VB program from using traditional daq to daqmx. I have used gated event counting in traditional daq and would like to same functionality as that in my new program. I have figured out Edge event counting using digital pause trigger can be used instead of Gate event counting., but i dont have any example of digital trigger in VB. I have an example in c#.Net, but has entirely different set of library, i tried to search through the function definitions in VB, but i have not found any with respect to setting up trigger. It will be great if I get an example for using trigger or the functions which is to be used.

Thanks in Advance.

Ram

0 Kudos
Message 15 of 30
(3,430 Views)
 

Hello Ram.

I see that you are trying to transistion from Traditional DAQ to DAQmx. Here are some really awesome resources to get you started (Take a look at Part2 there is information on triggering):

Transition from Traditional NI-DAQ (Legacy) to NI-DAQmx using Microsoft Visual Basic .NET

Transition from Traditional NI-DAQ (Legacy) to NI-DAQmx using Microsoft Visual Basic .NET: Part 2

Transition from Traditional NI-DAQ (Legacy) to NI-DAQmx using Microsoft Visual Basic .NET: Part 3

Transition from Traditional NI-DAQ (Legacy) to NI-DAQmx using Microsoft Visual Basic .NET: Part 4

In addition, take a look at the shipping examples for .NET at the following locations:

\National Instruments\MeasurementStudio2005\DotNET\Examples\DAQmx
\National Instruments\MeasurementStudio2003\DotNET\Examples\DAQmx

There are also other example on www.ni.com that would be useful. They many not be exactly that same as your application, but they can easily be modified. 

I hope this helps, let us know if something is unclear.

Happy Coding!

Regards,
  Sandra T.

Applications Engineer | National Instruments

 
0 Kudos
Message 16 of 30
(3,407 Views)

Hi Sandra,

Thanks for your response. I have the documentation for .NET fundamentals, but I have not found any documentation for VB. I have noted a example Edge counting using Digital pause trigger in C#.Net. Could you please give me some detailed description how that program works? Because I can get some basic idea from the description given, but when i tried the program, I am getting counts irrespective of connection of source to pause trigger. I am getting counts when pause trigger is High and when it s low no counts. thats fine, but the trigger works even if I am not connecting any source to Dev1/PFI10

 

Thanks

0 Kudos
Message 17 of 30
(3,401 Views)

Hello Ram,

I must of misread the last post, you are intrested in Visual Basic and not Visual Basics .NET. I was unable to locate the example that you are referring to. But I did find these examples:

Analog Software Trigger for Visual Basic 

Hardware Digital Trigger for Visual Basic 

Retriggerable Analog Output with Measurement Studio for Visual Basic 

There are a number of resoures on our website. Shipping examples also install in the C:\Program Files\National Instruments\NI-DAQ\Examples\Visual Basic 6.0 folder of your hard drive. You can also reference the NI-DAQmx C Reference Help. The function names in the NI-DAQmx C API and the NI-DAQmx Visual Basic 6.0 API are identical. Use the NI-DAQmx C Reference Help to look up the descriptions of the NI-DAQmx functions in the NI-DAQmx Visual Basic 6.0 API.Regards,

Regards,
  Sandra T.

Applications Engineer | National Instruments

 
0 Kudos
Message 18 of 30
(3,389 Views)
Hello Sandra,
 
Thanks for you response. I have figured out using triggers in VB. I have writen a program which generate a pulse and the generated pulse in ctr0 it acts as a trigger source for other counter say ctr2 and seems to work fine. So I am going to proceed in implementing this program for our application. If any problem I will give you a shout.
 
Regards.
0 Kudos
Message 19 of 30
(3,375 Views)
Hello Sandra,
 
I would like to get help on MCS mode now. There is three modes namely, Master, Handshake and slave mode in MCS mode. I am writing in DAQmx from Traditional DAQ, There are some functions in Traditional DAQ which made me lost to work around.
 
 
If (iMCSMode <> 1) Then ' <> master mode
        ' Wire sync in signal:
        If (iMCSSyncIn = 0) Then
            ' SOURCE(2) [TAC start]
            i6602Status = Select_Signal(i6602DeviceNum, ND_START_TRIGGER, ND_PFI_31, ND_LOW_TO_HIGH)
        Else
            ' AUX_LINE(5) [Port A, pin 3]
            i6602Status = Select_Signal(i6602DeviceNum, ND_START_TRIGGER, ND_PFI_17, ND_LOW_TO_HIGH)
        End If
 
I have attached the program for your reference, it will be great if i get any assistance to proceed on.
 
Thanks
   
0 Kudos
Message 20 of 30
(3,285 Views)