Join us today!

Notifications
Clear all

[Solved] Combobox Issues

5 Posts
2 Users
1 Reactions
596 Views
ehixenbaugh
Posts: 32
Topic starter
(@ehixenbaugh)
Trusted Member
Joined: 2 years ago

All,

I am having issues with implementing a Combobox on a Content area in a TwinCAT HMI project. I am unsure as to what I am doing wrong, but I have a combobox where I select the color I want my car to be. 

I have created data for the combobox as shown and data bound a mapped variable back in the PLC program:

CarColorSelect
CarColorAction

It just does not change at all. I don't know if this has to do with the use of the combobox on a content panel instead of an actual view?

-Evan H.

Reply
4 Replies
1 Reply
twinControls
Admin
(@twincontrols)
Joined: 2 years ago

Member
Posts: 114

@ehixenbaugh Hi, 

If you follow the steps below, you will be able to get the data.

 

white

 

red

 

onselection

 

selectedvalue
Reply
ehixenbaugh
Posts: 32
Topic starter
(@ehixenbaugh)
Trusted Member
Joined: 2 years ago

@twincontrols I tried your suggestion but it did not work. Also, in my program SelectedValue is a STRING. Is that going to work with an integer type. In your example, you use an INT, in mine I use a UDINT.

What is weird is that if I make any change to the Action of the Controls on the Combobox, it will write to the variable in the PLC program in that one instance. Once I leave that content and go to a different content view in the HMI program, then come back it does not work anymore.

I am going to make a whole new program and try again.

-- attachment is not available --

Reply
1 Reply
ehixenbaugh
(@ehixenbaugh)
Joined: 2 years ago

Trusted Member
Posts: 32
ehixenbaugh
Posts: 32
Topic starter
(@ehixenbaugh)
Trusted Member
Joined: 2 years ago

Okay I now have it working. I am not sure what was wrong with my original. I know that in my list I set the SelectedValue data type to a STRING instead of an INT, so maybe that is why, but again I don't know for sure.

Thanks again for all the help, Ilyas.

-Evan H.

Reply
Share: