LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI Scripting error 1060

Solved!
Go to solution

Hi all,

I have a question when I am learning the "Script Random Strip Chart" example of VI Scripting. To put the Waveform Chart inside the While Loop, the example uses the method of repositioning block diagram objects. I am wondering if I could directly wire the refnum output of While Loop to the refnum input of Waveform Chart. So I tried, but got an error 1060: " Object cannot contain (own) the specified object".

I tried to put Add Function or Numerical Constant inside the While Loop using this method, and they work fine. Why is Waveform Chart different?

 

Thanks!


 

0 Kudos
Message 1 of 9
(4,550 Views)

It's unclear what you are trying to do; and you provide no code.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 9
(4,521 Views)
Solution
Accepted by topic author Ellie90

So when you are creating the Waveform Chart, you are creating the Front Panel item which is why it cannot be placed inside of the while loop. If you notice later on in the example you are using the Waveform Chart object which you have created to get a reference to the terminal (that is the block diagram object) and then moving that item into the while loop.

Matt J | National Instruments | CLA
Message 3 of 9
(4,506 Views)

I have been searching and thinking about why for several days. Your answer solves my question perfectly. Thanks!!

0 Kudos
Message 4 of 9
(4,504 Views)

Thanks!

0 Kudos
Message 5 of 9
(4,501 Views)

You're right: I tried, and I can't place a Waveform Chart in a while loop.

But I could place a Waveform Graph in a while loop:

wgiwl.png

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 6 of 9
(4,485 Views)

Hi Paul,

I tried to place a Waveform Graph in a while loop, but still got error 1060. My test code is attached. It is interesting that you can. Do you mind sharing your code? Thanks!

 

0 Kudos
Message 7 of 9
(4,449 Views)

You can't just place a waveform graph (a front panel object) into a block diagram object (a block diagram object).  You need to get the reference to the terminal of the graph, then move that.

 

Error 1060 fix.png

Message 8 of 9
(4,441 Views)

Gee, I was being facetious.  Although it is possible to put some controls onto a block diagram, there's really little point to it, as they just act like block diagram constants (and in the case of a graph, a very useless constant).  As to how it's done: use the 'Replace' method.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 9 of 9
(4,431 Views)