I've just started using Codesys and have been transplating a system written in step 5 over to codesys v3.3 using ladder logic. While doing this i have encounterd some problems with the software and i was wondering if there were any solutions to this.
Problem 1 :
I have roughly 430 adresses which makes the adress table for PLC_PRG a tad hard to oversee. Now i was wondering if there is a way to get a good overlay of all possible signals in a adress table or something of the like.
Problem 2 :
While programming in a Action, the program doesn;t see any of the adresses in the adress list as in PLC_PRG and therefore isn't able to use the auto-fill option while typing. It does recognize the adress when you correctly type the adress but not otherwise. Once again, i was wondering, is there a way around this?
Problem 3 :
Is there a function block that i can call on to put use for calculations. Something along the lines that i create it, put in a formula and it then does the math for me? Or do i have to do it the old fashioned way and use normal function blocks inside a action? Or are there other options?
And last but not least, Problem 4.
I need to give the same name to multiple adresses. Say calculate i wanna give to mx1.0,mx1.1 and mx1.2. Is there any way to do this without adding a calc_1 or calc_2 at the end?
I hope there is some way around these problems, cause it would make the software alot easier and faster to use.
Thank you for you time and help,
D Planque
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
can't answer all your questions (don't work with ladder logic), but I have a solution for problem 1 and problem 2:
In the ressources you can create one or more global variable lists. You can put all addresses there, the PLC_PRG and all other POUs will find it there.
Problem 3: I'm afraid there is no such function block. You will need to create functions or function blocks for the calculations yourself. Best for mathematics is ST.
Problem 4: That is not possible. If you try to use the same identifier for several addresses, how the compiler should know which address to use in a given situation?
Hope this little information helps.
Regards
Rolf
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I've just started using Codesys and have been transplating a system written in step 5 over to codesys v3.3 using ladder logic. While doing this i have encounterd some problems with the software and i was wondering if there were any solutions to this.
Problem 1 :
I have roughly 430 adresses which makes the adress table for PLC_PRG a tad hard to oversee. Now i was wondering if there is a way to get a good overlay of all possible signals in a adress table or something of the like.
Problem 2 :
While programming in a Action, the program doesn;t see any of the adresses in the adress list as in PLC_PRG and therefore isn't able to use the auto-fill option while typing. It does recognize the adress when you correctly type the adress but not otherwise. Once again, i was wondering, is there a way around this?
Problem 3 :
Is there a function block that i can call on to put use for calculations. Something along the lines that i create it, put in a formula and it then does the math for me? Or do i have to do it the old fashioned way and use normal function blocks inside a action? Or are there other options?
And last but not least, Problem 4.
I need to give the same name to multiple adresses. Say calculate i wanna give to mx1.0,mx1.1 and mx1.2. Is there any way to do this without adding a calc_1 or calc_2 at the end?
I hope there is some way around these problems, cause it would make the software alot easier and faster to use.
Thank you for you time and help,
D Planque
Hi,
can't answer all your questions (don't work with ladder logic), but I have a solution for problem 1 and problem 2:
In the ressources you can create one or more global variable lists. You can put all addresses there, the PLC_PRG and all other POUs will find it there.
Problem 3: I'm afraid there is no such function block. You will need to create functions or function blocks for the calculations yourself. Best for mathematics is ST.
Problem 4: That is not possible. If you try to use the same identifier for several addresses, how the compiler should know which address to use in a given situation?
Hope this little information helps.
Regards
Rolf
The global variable list is indeed very usefull, sadly it doesn;t solve the problem of that it is nearly impossible to oversee.
Atleast i don;t have to remember all my signals anymore or use a excel sheet.
Thnx