I have a textList linked in a combo box as follow:
"SelectionA"
"SelectionB"
"SelectionC"
When the code is running and one of last three option is selected, the variable change its value from 0 to 2 as well.
For example: if the "SelectionC" is active the variable value is 2 but it is not enough. I would like have back the selection name and not the position. In this case "SelectionC". Is it possible?
Thank
Luca
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi to All,
I have a textList linked in a combo box as follow:
When the code is running and one of last three option is selected, the variable change its value from 0 to 2 as well.
For example: if the "SelectionC" is active the variable value is 2 but it is not enough. I would like have back the selection name and not the position. In this case "SelectionC". Is it possible?
Thank
Luca
Hi.
You can use CmpDynamicText library or TextListUtils to get string from texlist by id (id is value of Combobox variable).
https://faq.codesys.com/display/CDSFAQ/Access+to+Text+Lists+from+the+IEC+Code
Last edit: kislov 2020-04-20