From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help for RT PC timed loop in us?

I have created realtime target  quadcore PC  and created a pulse pattern(500kHz) using DIO pin0.1 and both counters. I want to repeat the pattern or send manny patterns after 512us. I am using time loop. It is not providing more than 28ms however it is showinh 1Mhz clock which is not present in not real time loops.Please help me out to have the time loop run at 512us interval?

 

Yours sincerely 

0 Kudos
Message 1 of 20
(2,791 Views)

Hello Ali,

 

Can you use the left node to check if the timed loop is finishing late? remember that even if you select the micro seconds clock, that does not mean that all your code can be execute within the time period you specify.

 

Regards

 

Mart G

0 Kudos
Message 2 of 20
(2,739 Views)

I have reduced the size of program that it can not be further reduced. when loop time is 10ms . there is much differecnce in expected and actual finish time. I dont know why NI has given that option of 1Mhz clock . When i used the same redued code in sinple PC with Labview it was at least providing timeloop  upto 2ms interval. the PC was pentium 4. i craeted RT target quad core PC. time loop in Mhz was on but loop time interval is not becoming less than 10ms. I will JUST SAY THAT I ARRANGED PCI 6251 AND THAT MHz OPTION FROM NI HAS GREATLY FOOLED ME.

 

Yours sincerely

0 Kudos
Message 3 of 20
(2,730 Views)

Hello Ali,

 

I understand your frustation, and please accept my apologies for any inconvenience. I checked the domentation and according to this document:

 

http://digital.ni.com/public.nsf/allkb/0C0A6EE528F85A6486256F6700061790?OpenDocument

 

The Desktop PC´s should be able to use the MHz clock source. However remember that if you are acquiring data, the sampling rate does not depend on how fast the timed loop iterates, as the DAQ board has it own clock. The timed loop just determine when you call the DAQmx read function to pull out the data that the DAQ board has out in the memory buffer. My advice at point however is that you create an Service Ticket so we can assist better, or if you want to share your code with me I can test it in one of our PXI devices to see if the issue is with your code or your hardware, in any case we would like to help you, as our final goal is that our customer are succesful while developing their projects

 

Regards

 

Mart G

0 Kudos
Message 4 of 20
(2,724 Views)

the code i am sending u is running in simple PC upto 2ms interval of time loop using 1KHz clock.But same thing when i chek with real time PC the interval is not exceeding 10ms even i select 1Mhz clock.This code is simple.

The code which i am using for my task is running time loop with the interval of 28ms.

My setuo inculde NI PCI 6251 with quad core realtime target  PC and core i3 laptop as developmanet platform used for targeting.

0 Kudos
Message 5 of 20
(2,719 Views)

I just want to add in that NI real time target PC is not at all a solution for time loop in Mhz when u r dealing with DAQ I/O because of execution delays ?And i don't find this information related to this limitation in related documents of NATIONAL INSTRUMENT? As in the specification of many cards it is written that they are compatible with RT PC target but what is use of compatilbity if one can not acquire the benefit of time loop in 1Mhz for which REAL TIME TARGET PC is considered???

 

Yours sincerely   

0 Kudos
Message 6 of 20
(2,687 Views)

The code you show is mostly meaningless, and is missing a critical subVI "24TD.vi."  Can you upload code, including subVIs, that shows how you are determining that the code is not running at the speed you want?  Are you measuring with an oscilloscope, or are you doing something in software (for example using the Finished Late? terminal in the loop) to determine the speed?

 

It is possible you are misuing the DAQmx VIs, which could prevent you from achieving full speed.  Without seeing the 24TD.vi it's impossible to know if that's the case.  However, if you are starting and stopping the DAQ task on each loop cycle, that will definitely slow the loop unnecessarily.  Also, if you want high-speed pattern generation, it would be better to generate the entire pattern and write it all at once to the DAQ card, letting the card handle the timing, instead of writing one point at a time.

 

Finally, please try to use full words and sentences instead of text abbreviations (ie, use "you are" and not "u r").  This will make your writing both clearer and more professional.

0 Kudos
Message 7 of 20
(2,683 Views)

I have tried to write once whole pattern on DAQ than output it. I am measuring output on oscilloscope. The ocsilloscope can measure this type of signals easily. If you can help out tell me.

 

Yours sincerely. 

0 Kudos
Message 8 of 20
(2,667 Views)

Very strange vi:

If you restart the task every time, it is really slow.

If you need to generate one pattern for a long time, DAQmx does it automatically. If you need to change the data, either see non-regeneration mode in daqmx examples or restart the task (once - on change).

You do not need a counter to generate pulses for the task sampling unless default clock can not do it: uneven spacing between samples, bursts of samples, synchronization with the external clock.

By the way, it seems this task does not need real-time pc: daqmx works inside the board including all regeneration, counter retriggers. Real-time might be usefull only if you need to change the pattern on the fly, without loosing a single trigger event during this change.

0 Kudos
Message 9 of 20
(2,658 Views)

In addition to the accurate comments from Alexander_Sobolev, note that there is no reason to use a local variable for the pattern.  Wire the boolean array constant directly the DAQmx Write.

0 Kudos
Message 10 of 20
(2,646 Views)