LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

to connect two different controls on front panel by wire during run time


@alisa87 wrote:

will u please post vi for my reference ?


That would teach you something, but not the right thing. We want to spend hours teaching you how to do it, but if we start making things, there would be no end to it. There are grey areas, for instance if you made a significant effort yourself, we'd probably send over changes.

 


@alisa87 wrote:

what i m working on is a big application and taking a long time
as i m labview beginner 


Big applications take long time for anyone. It's just that the end result is usually a lot better when experienced users build it. The only way to get there is to gain that experience... Finding out how stuff works, with some guidance is the way to do that.

 


@alisa87 wrote:

 ,it is taking more time for me to create


Honestly, if you got stuck here, I'm wondering how the rest of the big application will go. You're focusing on details. Make sure you keep the big picture in mind. It's more important.

 


@alisa87 wrote:

its a humble request!!!


That's relative. Try handling 20 of these humble requires per day. If I don't, I actually get paid to do that kind of work.

 


@alisa87 wrote:

if possible please attach a vi for reference


At least try to make clear what you want exactly. Imagine you're explaining the situation to someone why does not know anything about what you want (as this is what you're doing). Don't spare any details, especially the trivial ones.


 

Message 11 of 20
(971 Views)

First of all sorry for late reply!!!!!
i will try to explain in more detail.
1.If user clicks on ring control and after that click anywhere on front panel,it should  create a new ring control (with same item list) at that position

2.After that newly created control should be able to connect to the another control(sub vi) on front panel by arrow or line...
this is what i m trying for....

 

0 Kudos
Message 12 of 20
(961 Views)

Hi Alisa,

 

1. You cannot create "new controls" at runtime. You can only make existing controls (in-)visible… So make that predefined ring visible and cop the items of the first ring to the other one.

 

2. I already attached a VI showing how to draw a line…

 

There probably is a better way to create a configuration dialog for your users instead of trying to recreate the LabVIEW IDE! Your request sounds like you want to use some VIScripting: this only works in the development environment, but not in an executable.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 20
(955 Views)

@alisa87 wrote:

1.If user clicks on ring control and after that click anywhere on front panel,it should  create a new ring control (with same item list) at that position

2.After that newly created control should be able to connect to the another control(sub vi) on front panel by arrow or line...
this is what i m trying for....


So after the program has been used for a long time there should be an infinite number of identical ring covering the entire front panel? This idea does not seems to scale right! It would also be unusable, because any click would create new rings instead of processing user inputs (e.g. change in ring selection). (And as has been said, controls cannot be created at run time anyway.)

 

Wouldn't it be sufficient to have a single ring control that would just move to a certain location on the front panel according to some define rules?

Message 14 of 20
(936 Views)

Actually my goal is to create a new ring control only if user click on existing ring control.
If user does not click on front panel ring control,it should not create any new control.

I need multiple ring controls for assigning different inputs to different sub vi.

 

Is there any alternative for new ring control during run time?

 

0 Kudos
Message 15 of 20
(915 Views)

Hi alisa,

 

Is there any alternative for new ring control during run time?

Yes, as has been said before: use existing ring controls!

You CANNOT create new controls at runtime, but you can make existing ones (in)visible!

 

I need multiple ring controls for assigning different inputs to different sub vi.

Why do you need this?

You also CANNOT add subVIs at runtime - it's the same as with controls!

 (You might call subVIs dynamically, but then you need to know their connector pane in advance: so again you can prepare the needed controls…)

 

Please explain your use case with more details: there surely is a way to fulfill your requirements!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 20
(911 Views)

@alisa87 wrote:

 

Is there any alternative for new ring control during run time?


Yes, no new ring control during run time.

 

Copying controls when you click them doesn't make any sense. As we can't imagine any use case for this, it's really hard to suggest a solution. Not sure if you need to explain from a higher level or a lower level what you try to do, but we need to understand before we can help.

 

I think you're focused on a solution for something that should not be a problem when done properly. It feels like you're thinking outside of the box a bit too much. But I could be wrong, it's hard to tell.

0 Kudos
Message 17 of 20
(907 Views)

hi
i have enclosed a video which explains scenario  little bit more!!!

0 Kudos
Message 18 of 20
(882 Views)

It looks like you want to create something akin to a VI editor.  That would be a very large and pointless endeavor.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 19 of 20
(868 Views)

@alisa87 wrote:

hi
i have enclosed a video which explains scenario  little bit more!!!


A picture control is the only way I know off for sure that can do this.

 

It would be a lot of work (did similar things). Easily 5 days for me, and I have around. You'd probably need to be proficient in all the available tricks and topics: OO, Architecture, UI stuff, event structures, recursion, etc.

 

I do see how this is useful: you need to provide the user an interface to program their logic.

Message 20 of 20
(859 Views)