Discussion:
Limitation in script size inside repeat ?
(too old to reply)
Ferraro Guy
2006-11-15 16:40:14 UTC
Permalink
Hi, We use a PXI-6541 to generate triggers to multiple devices. We noticed an error when the lines inside nested repeat loops exeed 54 lines. I am attaching the files we used. Marche.txt does not generate an error. Marchepas.txt generate an error "Driver Status:  (Hex 0xBFFA4BDC) DAQmx Error -200035 occurred: Repeat loop is contained within too many levels of nested repeat loops" copied at the end of the text file. I am not sure if the error is reported correctly since the nested repeat are the same in both files.Can someone (maybe you Ryan) confirm a limitation in the number of line when using nested repeat loops?ThanksGuy Ferraro


Marche.txt:
http://forums.ni.com/attachments/ni/70/5828/1/Marche.txt


Marchepas.txt:
http://forums.ni.com/attachments/ni/70/5828/2/Marchepas.txt
Omar S.
2007-01-31 15:40:15 UTC
Permalink
For error -200035, you need to reorganize to avoid nesting REPEAT loops inside each other (it's O.K. to nest a REPEAT inside a REPEAT FOREVER, though; this is shown in the LabVIEW script example) . The error message suggests a couple of workarounds they might try:
- "Unroll the loop": remove some REPEAT loops by using multiple GENERATE instructions. For example,
replace:
REPEAT 3
GENERATE wfmSine
END REPEAT
with:
GENERATE wfmSine
GENERATE wfmSine
GENERATE wfmSine
- Eliminate an outer loop from the script and, instead, generate their whole script multiple times.
Omar S. NIF
 
ryanm
2007-02-07 20:10:14 UTC
Permalink
Hi Guy,
 
The issue described is caused by too many statements within a finite repeat loop.  Unfortunately, the error message is not correctly addressing the issue.  I am guessing you are using a HSDIO version prior to 1.4.3.  In HSDIO 1.4.3 several enhancements were made to error handling.  When I run your script using this version of the driver, I receive the following error:
 
Possible reason(s):Driver Status:  (Hex 0xBFFA4807) DAQmx Error -201016 occurred:Too many compiled instructions in loop.  "Generate" and "Wait" instructions each result in at least one compiled instruction.  Each marker adds an additional compiled instruction.  Clear instruction does not result in a compiled instruction.
If possible, reduce the number of generate instructions by concatenating the waveforms on two or more consecutive generate instructions.
Line Number: 11Position in Line: 4Number of Instructions: 58Maximum Number of Instructions: 55
Status Code: -201016
 
Although it is not required, upgrading to HSDIO 1.4.3 (<a href="http://digital.ni.com/softlib.nsf/websearch/D123DB9EF4A52888862571FF0070DB0A?opendocument&amp;node=132060_US" target="_blank">http://digital.ni.com/softlib.nsf/websearch/D123DB9EF4A52888862571FF0070DB0A?opendocument&amp;node=132060_US</a>) will add improved error handling and LabVIEW 8.2 support.
&nbsp;
Please let me know if you have any questions.
&nbsp;
Ryan
ryanm
2007-02-08 16:10:13 UTC
Permalink
Glad to hear it is working now.&nbsp; Sorry for the confusion.
&nbsp;
Ryan

Continue reading on narkive:
Loading...