NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Array of 1 element not valid?

I place in a data type an array of 1 container (lo boud = hi bound = 1).

When debugging the application, structure contains the container with [1...empty]

Is it a known situation? as a work around, I try to make a [1..2] array but it is not pleasant for application.

Teststand 2013.

0 Kudos
Message 1 of 10
(4,847 Views)

How are you creating the array? I am not able to reproduce the problem. A bounds of 1 and 1 works for me. I see [1..1] not [1..empty]. Did you perhaps check the "empty" checkbox by accident when specifying the bounds in the dialog? Or are you changing the bounds programmatically. Please explain exactly what you are doing.

 

-Doug

0 Kudos
Message 2 of 10
(4,843 Views)

"Empty" not check

I insert in my FileGlobals variable an array of own type and fill in manually the bounds.

See attachments

 

I've done it for several variables it was OK.

Now I want to insert in the strucure such element (Array of 1 structure) and it doesn't work fine.

 

Download All
0 Kudos
Message 3 of 10
(4,839 Views)

It's still unclear what you are doing to change the bounds of the array and I am still unable to reproduce the problem. Please list step by step how to reproduce the problem, or attach a sequence file which illustrates the problem. There is no known bug like you are describing and I am unable to reproduce the problem.

 

-Doug

0 Kudos
Message 4 of 10
(4,832 Views)

What I did, step by step:

1) in an existing structure, insert a new element in a structure, type Array of Type of a container you previously defined

2) for bounds, set lower to 1 and upper to 1

3) name it Dummy or as you want

4) move the element between other ones in the sequence

5) start the sequence with a break point that allows you to see structure contents in watch windows

 

My previous variable has this empty bound but not the one I'v e created to revalidate the process 😞

 

I'll work again today on this issue to reproduce or solve it.

 

On you side, do you have any possible reasons for this "Empty" upper bound?

0 Kudos
Message 5 of 10
(4,799 Views)

I'm following you up until step 4). I have no idea what you mean by "move the element between other ones in the sequence". Please explain.

 

Are you creating a local variable of the type? I did that and still do not see the problem you are describing:

 

forumissue.png

 

One thing that comes to mind is that if the instance existed before you set the size of the array to 1..1 then it will have whatever its original dimensions were. Changing the dimensions of an array in a type does not affect the dimensions of existing instances. You can have the change update all loaded instances though if you check the "Apply Bounds to All Loaded Instances of the Type" checkbox when redimensioning the array.

 


Hope this helps,

-Doug

0 Kudos
Message 6 of 10
(4,792 Views)

Please make a structure with several elements (simple number to begin with).

Insert the structure.

Move the created structure between existing elements.

This is the situation when you have an existing container and want to add a new structure "in the middle"

0 Kudos
Message 7 of 10
(4,766 Views)

@R1M wrote:

Please make a structure with several elements (simple number to begin with).

Insert the structure.

Move the created structure between existing elements.

This is the situation when you have an existing container and want to add a new structure "in the middle"


Still not sure what you mean by "Move the created structure between existing elements". Can you describe in more detail?

 

I tried adding the array to the middle of an existing typedef and still did not see any problems, even in existing instances:

 

forumissue.png

 

 

-Doug

0 Kudos
Message 8 of 10
(4,760 Views)

I mean "frag and drop Filed2 between Field and Field3 (it were an array). For me, even if the display is [1...1] at execution it can switch to [1...empty] creating errors.

I tried again on my side and sometimes it OK sometimes NOK. Unfortunately, I can't spend time analysing this issue: I have to port the application on W7 by end of the month and each step I go over a new issue comes up 😞

I'm really deispointed with migration of own application with NI Teststand and CVI environments.

 

0 Kudos
Message 9 of 10
(4,755 Views)

@R1M wrote:

I mean "frag and drop Filed2 between Field and Field3 (it were an array). For me, even if the display is [1...1] at execution it can switch to [1...empty] creating errors.

I tried again on my side and sometimes it OK sometimes NOK. Unfortunately, I can't spend time analysing this issue: I have to port the application on W7 by end of the month and each step I go over a new issue comes up 😞

I'm really deispointed with migration of own application with NI Teststand and CVI environments.

 


I tried dragging and dropping and still do not see any problem:

 

forumissue.png

 

I doubt any of the changes to the type at edit time (or the port to Windows 7 and the newer version of TestStand itself) have anything to do with what you are seeing at runtime. At runtime there is a completely separate copy of local variables that are initially created from the edit time copy, but once the sequence is running they are completely separate variables. It's more likely that something in your sequence at runtime is affecting what you are getting at runtime. If you are able to give us a sequence or detailed instructions for reproducing the problem either now or at somepoint in the future, I would be happy to help determine the cause.

 

Also there is nothing treated specially about setting the array bounds to 1..1 versus 1..2 or any other set of bounds, so it's unlikely that that has any direct cause on the problem you are seeing.

 

-Doug

0 Kudos
Message 10 of 10
(4,748 Views)