Jump to content

Loop rate of DAQmx PXI-6259 in LabVIEW Real-Time


bono02

Recommended Posts

This is a cross posting, I also posted in here: http://forums.ni.com/ni/board/message?boar...;thread.id=4915

I hope others LaVa's member could help me faster...

-----------------

Hi all,

I am using LV RT8.5 with 2 PXI installed, the PXI-7358 and DAQmx PXI-6259. I wrote a program in LabView RT of a single timed loop with time constraint 5 ms. The first program, the loop rate was OK (no delay, finished late boolean is false), however, when I added a subVi, suddenly the loop rate became high and delay occured (finished late boolean is true).The delay could reach to 100ms 16x16_smiley-sad.gif

I attached the pictures below.

1. The fine loop without subVi

2. The loop with subVi

3. The subVi

What I guess now the problem is because of the DAQmx create virtual channel and DAQmx start. However, If I remove these functions from the subVi, thus I have to connect the DAQmx create virtual channel and DAQmx start in every main program, and thus it will give so much work and make the program more complex.

Are there any solutions for this. I really appreciate your help.

Regards,

Bondhan

Link to comment

You could build an auto-initialize function, in the first call you create and start the task.

In succeeding runs you only read the DAQ.

However I advice you to timed IO within DAQmx, so the timing is handled by the daqmx driver and not by LabVIEW.

To do this you should create a clock on your 6259 of 5 ms, and do a burst read in LabVIEW of 1 sample, no timing needed the speed will be limited by the DAQ card.

Ton (look at the NI examples for timed IO)

Link to comment

QUOTE (Ton @ Nov 2 2008, 01:12 AM)

Hi Ton,

Thank you for your reply. However, I could not find example in ni.com related to auto-initialize function.

Could you give me one example?

Or perhaps what you meant was the create instance function (like constructer in C++) in LV Object Oriented Graphical Programming,

was this what you mean?

QUOTE (Ton @ Nov 2 2008, 01:12 AM)

However I advice you to timed IO within DAQmx, so the timing is handled by the daqmx driver and not by LabVIEW.

To do this you should create a clock on your 6259 of 5 ms, and do a burst read in LabVIEW of 1 sample, no timing needed the speed will be limited by the DAQ card.

Did you mean using external trigger? I am not planning to use ext. trigger though, since I desire only to use the source from a single machine.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.