Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Limitation in script size inside repeat ?

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?

Thanks

Guy Ferraro
Download All
0 Kudos
Message 1 of 6
(3,947 Views)

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

 

0 Kudos
Message 2 of 6
(3,865 Views)
Thanks Omar,
I had a answer from NIC and actually the error message is misleading. The number of lines is limited to 55 and the error message will be fixed in the next release (Feb 07).

Guy Ferraro
0 Kudos
Message 3 of 6
(3,864 Views)
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: 11
Position in Line: 4
Number of Instructions: 58
Maximum Number of Instructions: 55
Status Code: -201016
 
Although it is not required, upgrading to HSDIO 1.4.3 (http://digital.ni.com/softlib.nsf/websearch/D123DB9EF4A52888862571FF0070DB0A?opendocument&node=13206...) will add improved error handling and LabVIEW 8.2 support.
 
Please let me know if you have any questions.
 
Ryan
0 Kudos
Message 4 of 6
(3,810 Views)
Thanks Ryan. Yes we have updated our HSDIO version and rectified the number of statements. We do not have any errors anymore.
Thanks.
 
0 Kudos
Message 5 of 6
(3,797 Views)
Glad to hear it is working now.  Sorry for the confusion.
 
Ryan
0 Kudos
Message 6 of 6
(3,790 Views)