Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

External sample clock divider

I have some experience with CompactDAQ systems, but I have now reached a point where I am not sure if (and how) it is possible to do what I wish.

 

I have a cDAQ-9174 with a 9411 (slot 1) and a 9205 (slot 2).

 

I have created an analog (Voltage) task which is externally clocked from an input on the 9411 board.

The issue is that the frequency of the external clock is too high, and I would like to divide the clock 2 or 4 times to reduce it.

Is this possible? I should probably mention that I configure the tasks using NI MAX.

0 Kudos
Message 1 of 7
(3,901 Views)

Hi, 

 

Your question sound similar to what is described in this solved post where they show how to make a clock divider based on "AI Sample Clock Timebase" and "AI Sample Clock". 

 

There is also an example here

 

Do any of these help? 

 

Kind Regards, 

 

Riley Ilieva

Applications Engineer

National Instruments

0 Kudos
Message 2 of 7
(3,863 Views)

Hi

 

The post and the example you are referring to are based on LabView. I understand that the underlying mechanisms are the same, but it is hard for me to see how to set this up in NI MAX, or to know if it is even possible.

In the final application I use a custom VB.NET program which depends on the NI-DAQmx API.

0 Kudos
Message 3 of 7
(3,860 Views)

Hi, 

 

I can't see how this would be done while setting up the task in MAX. There you would just define the external clock. I think this would need to be a function call within VB.NET similarly to how you define this in LabVIEW but I am not familiar with VB.NET. Will look into how this could be done and let you know. 

 

Kind Regards, 

 

Riley Ilieva

Applications Engineer

National Instruments

0 Kudos
Message 4 of 7
(3,848 Views)

Hi

 

I was beginning to suspect that it could not be done in NI MAX alone. I'd be very happy if you could find out how to do it in .NET.

 

Regards

Linus

0 Kudos
Message 5 of 7
(3,843 Views)

Hi Linus, 

 

When DAQmx was created they tried to make these tasks as transferable as possible to other programming environments. 

 

I just spoke to our systems engineer and they recommended that you should use the LabVIEW example as a roadmap. E.g. here in the Create Task function they include high and low ticks and in the other examples they include a divider. These are wired into the CreateTask function so that mean that you should be able to call this function in VB and give it these parameters as inputs. The LabVIEW example seems different because of the graphical interface but in principle calling the DAQmx function should be the same regardless of the language. 

 

If you are unsure of how to call DAQmx functions in VB.NET there is general overview of using DAQmx in VB.NET here and there is explanation on how to find examples here . 

 

Let us know if that makes sense. 

 

Cheers, 

 

Riley Ilieva 

Applications Engineer

National Instruments

0 Kudos
Message 6 of 7
(3,835 Views)

Hi Linus, 

 

Did you manage to access the DAQmx task information in VB.NET? 

 

Riley Ilieva

Applications Engineer

National Instruments

 

0 Kudos
Message 7 of 7
(3,821 Views)