9/22/2022 8:29 PM | |
Joined: 9/22/2022 Last visit: 9/25/2022 Posts: 4 Rating:
|
Hi, Sorry for making this topic active after so many years. I am experiencing problems with declaring variable from Data Block in Symbol Table. For example, I declare in Data Block (DB1) variable 0.0, name VAR, type WORD. In Symbol Table when I enter DB1.DBW0 for an address I get message that wrong data type is used. As I could understand from this topic, DB1.DBW0 should be written in the address column of Symbol Table. Am I wrong? Any ideas how to solve this? Thanks in advance. Regards, Dimitrije ------------------------------------------------------------------------------------------ |
Last edited by: Jen_Moderator at: 09/23/2022 05:22:09New subject after splitting |
|
9/23/2022 7:49 PM | |
Joined: 3/30/2020 Last visit: 9/15/2025 Posts: 5451 Rating:
|
Hello. Yes you can assign symbol names for the elements inside the global DB. The names are not stored in the symbols table. The names are stored inside the DB. Open the DB and view the DB. The symbol names are done much in the same way the parameters are done in an FC / FB. You should expect something like: Have a look at chapter 11 of the manual: ~ |
Last edited by: qwazee at: 09/23/2022 19:51:08Source of picture: https://www.slideshare.net/marcosromanholo7/scl-3-e Activities of this user is voluntary. There is no obligation or liability placed on this user. Though optional, your 'please' and 'thank you' is highly valued. |
|
9/24/2022 11:56 AM | |
Joined: 9/22/2022 Last visit: 9/25/2022 Posts: 4 Rating:
|
Hi, I was probably not enough clear with my question. When I assign symbol names for elements inside the global DB, can I do it also in Symbol Table? For example, In DB1 I declare: 0.0 (address) ; varName (Name) ; WORD (Type) ; W#16#0 (Initial Value) Then in Symbol Table I assign: varName (Symbol) ; DB1.DBW0 (Address) ; WORD (DataType) So, in OB1 when I want to use DB1.DBW0 address I simply type "varName" instead of typing DB1.DBW0. In that way, program will use DB1.DBW0 address (because I typed "varName" and that name is assinged to DB1.DBW0 in Symbol Table) and DB1.DBW0 is declared in DB1. Is it possible? Regards, Dimitrije |
9/24/2022 6:50 PM | |
Joined: 9/22/2022 Last visit: 9/25/2022 Posts: 4 Rating:
|
Okay qwazee, thanks for information and help. Regards, Dimitrije |
This contribution was helpful to
1 thankful Users |
Follow us on