timed loop executes before "period"

This is a discussion on timed loop executes before "period" within the labview forums in Programming Languages category; hi I am using Timed loop in labview 8.0 , winxp inside timed loop my application is to read a gpib port and write into file .Read , write , write to meas file is OK but each read write is not exactly 400 ms .but +- 40 , 60 . So i need to execute the timed loop in fixed time period =500ms. but the time col is not consistant. because of inconsistant timed while loop. I set the period of the loop "500"ms and periority 5000 or 500. i dont know why this is happening in dedicated timed loop....

Go Back   Application Development Forum > Programming Languages > labview

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 01-07-2008, 08:10 AM
Haider Abbas
Guest
 
Default timed loop executes before "period"

hi
I am using Timed loop in labview 8.0 , winxp
inside timed loop my application is to read a gpib port and write into file .Read , write , write to meas file is OK but each read write is not exactly 400 ms .but +- 40 , 60 . So i need to execute the timed loop in fixed time period =500ms.
but the time col is not consistant. because of inconsistant timed while loop.
I set the period of the loop "500"ms and periority 5000 or 500.
i dont know why this is happening in dedicated timed loop.
Reply With Quote
  #2  
Old 01-08-2008, 01:10 AM
Haider Abbas
Guest
 
Default Re: timed loop executes before "period"

yes off course i am now using low level file i/o but the behaviour is same , my code takes nearly 400 ms +-30ms but <500ms .
and loop settins are dt=500ms which is enough for code to comlete in time.
so i need to write after exactly 500ms passes then what should we do. or on the other hand i need a deterministic time col write.
 
Reply With Quote
  #3  
Old 01-08-2008, 08:10 AM
Haider Abbas
Guest
 
Default Re: timed loop executes before "period"

objective is to write a file at fixed sample time ,
first frame varies the  400ms   +-30ms
but i am writing file at 500ms period , 
so my file should save at fixed 500ms difference
 


hdr.JPG:
http://forums.ni.com/attachments/ni/...3496/1/hdr.JPG
Reply With Quote
  #4  
Old 01-08-2008, 06:10 PM
Amanda H
Guest
 
Default Re: timed loop executes before "period"

Hi Haider,
 
Are you running your LabVIEW code on a controller with the Real-Time OS or on Windows? If you are running on Windows XP, you will not achieve complete determinism, since the Windows scheduler will not be fully controlled by LabVIEW, but also by other programs running on your PC. More information about this is detailed <a href="http://digital.ni.com/public.nsf/allkb/A630A5192FC4B13486257209005BA0DB?OpenDocument" target="_blank">here</a>. Just for the reference of other visitors to the forum, <a href="http://zone.ni.com/reference/en-XX/help/371361D-01/lvconcepts/configuring_the_labview_timed_loop/" target="_blank">here</a> is a document about configuring Timed Loops.
Reply With Quote
  #5  
Old 01-09-2008, 12:10 AM
Haider Abbas
Guest
 
Default Re: timed loop executes before &quot;period&quot;

So the luxury option&nbsp;and use of 1kHz clock is useless in labview , that is not consistant even for &lt;=2Hz.
&nbsp;
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 08:33 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.