From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

A script longer than 47 lines gives an error

Hi all,

 

I have realized that the code gives me an error when I want to generate more than 47 points whereas each points is resulted from  multi-tone generation as shown in the attached thread. I have found someone has faced same problem but the way of solving it was different as follow:

https://forums.ni.com/t5/LabVIEW/Loading-and-running-consecutive-scripts-in-LabVIEW/td-p/3159550

Thus, I am wondering if there is something better than concatenate the array (I am not sure whether this one would work) or another way of tackle this issue. Thanks in advance

 

the error and an example of generated the tone is attached.

Download All
0 Kudos
Message 1 of 7
(2,464 Views)

Apologize for this, just to update the query. Thanks in advance

0 Kudos
Message 2 of 7
(2,417 Views)

Hey Al-rawachy,

 

From looking at the error message and your code snippet there are a couple of things that may cause this.

 

1. As you are generating the script in a loop, is it possible that it is creating too many rows for your hardware to store on its onboard memory? You could check this by trying to generate half as many waveforms and seeing if the error still occurs.

 

2. Is the formatting correct? The error message suggests that there are 50 commands on line 2 of the script, and in addition this is the only line to be indented. If you enable the slash display (by right clicking on the front panel indicator) you can see hidden symbols for line breaks and tabs etc.

 

3. Is it possibly specific to one device? When you are writing the waveform in the second for loop, you are taking the 'Name' property out of a bundle and iterating through names, is this going through several devices? You could check this by changing the error in the second loop from a shift register to output every error per device.

 

4. I cannot see the format specifiers you are using for the formatting operation, are you able to provide a bigger screenshot to show this?

 

Hopefully one of these suggestions helps!

 

Mitch

0 Kudos
Message 3 of 7
(2,387 Views)

Hi Mitch,

 

I am so glad that I got someone respond to my question. The answer for your question as follow:

 

1- when I generate less number of rows, it works fine.

2-  Two generators are used to generate the multi-tone signals at both input and output port of the DUT while 4 receivers are used to receive the    a(s) and b(s).

3- the corrected resulted string is attached now ( resulting string.jpg ) , I don't know how did I attach the wrong one in the previous one.

 

Thanks in advance

 

 

0 Kudos
Message 4 of 7
(2,371 Views)

Hey Al-rawachy,

 

From what you've said, it sounds as thought the internal buffer on the generators may be too small to hold the initial script given a smaller number of rows works. You should be able to find more information regarding this in the datasheets.

 

I'm afraid I can't think of anything else that would cause it.

 

Regards,

Mitch

0 Kudos
Message 5 of 7
(2,346 Views)

Dear Mitch,

 

Thanks for your replay, I an not 100% sure that the problem due to the buffer because the problem still exists with increasing or decreasing the number of samples and keeping the same number of generated waveform in the script! 

0 Kudos
Message 6 of 7
(2,336 Views)

Hey Al-rawachy,

 

I'm afraid I'm not aware of anything else that it could be, this isn't really an area I'm familiar with much. Hopefully somebody else will have more insight!

 

0 Kudos
Message 7 of 7
(2,321 Views)