Codesys dynamic text list

dbozic

Lifetime Supporting Member
Join Date
Oct 2013
Location
Zagreb
Posts
74
Hi,

I am new to Codesys programming environment so I started introducing myself and try some functions I use with other vendors like Siemens.
So I tried to make a text list which would show the string value based on the integer status.
I made a sample program (see attachment). I have two button which increase INT counter and use it like ID for text list. With the current settings I cannot show the next to the ID from the text list based on the value. I tried with numerous combinations of settings and no luck.
Can someone help me to guide me to the solution?
If there is not enough info I will upload more from the program part if needed..
 
Try this: Take "%s" away from the text field and do the same thing for the text variable field (remove "Outputs.step").You should leave these fields empty if you are using dynamic texts.


Then use your integer value in the text index field under dynamic texts menu.


Rebuild, activate your configuration and try again. Hope this helps...
 
Try this: Take "%s" away from the text field and do the same thing for the text variable field (remove "Outputs.step").You should leave these fields empty if you are using dynamic texts.


Then use your integer value in the text index field under dynamic texts menu.


Rebuild, activate your configuration and try again. Hope this helps...

Thank you! It works. I would swear I tried this and it didn't work in one of my iterations but obviously I missed something..

To use this topic for one more question. I work with Somachine v4.3 which is based on Codesys. I tried to simulate system bits (clock bit from PLC_GVL.PLC_R.i_x1sClk). but it looks like you cannot test the program with system bits in simulation or I must "enable" it somehow?
The program code does work on real PLC but in simulation the clock is not giving pulses.
 

Similar Topics

Hello, I have a requirement to manage the text alignment dynamically. So, for example: 1. English Texts should be displayed from Left in...
Replies
0
Views
138
How can I trigger the web browser to refresh based on a variable? ie when I receive a new image have FF / Chrome refresh. What I'm trying to do...
Replies
5
Views
4,378
Hello, I would like to execute code saved in initialization FB on the first start of the PLC. It is basically something like OB100 in the Siemens...
Replies
3
Views
45
Hi! What is the way to convert the code from the Codesys code to the Tia Portal? Regards, WK
Replies
4
Views
66
Hello to all, can you please provide an example of obtaining a current working directory as a string in CodeSys? For example, during starting the...
Replies
7
Views
231
Back
Top Bottom