1/18/2007 11:10 AM | |
Posts: 39 Rating:
|
Hi, I want to do following. I'm writing function block which I'll name Vect_Mul: 1. How to add symbolic name? 2. As an inputs and outputI'm using arrays Now I want to use this FB in other function block (or function) as following: Result:=Vect_Mul(In1:=...,In2:=....); without any function declaration, how can I do that? Regards Lukasz |
1/18/2007 3:16 PM | |
Joined: 9/23/2005 Last visit: 3/31/2025 Posts: 4406 Rating:
|
Hi, I'm not sure that I understand your problem, but first you mustdefine (and save)a simbolic name to a block, in the symble editor. Then you can use it symbolically in SCL. |
Denilson Pegaia |
|
1/20/2007 12:29 AM | |
Joined: 1/7/2006 Last visit: 3/9/2025 Posts: 2705 Rating:
|
Dear Lukasz, Only Symbolic names of standard blocks are recognized without any declaration... I have more times asked why there is no "module" file like in Visual Basic where you may define a list with constants and symbolics so that you don't have to define them seperately in the symbolic editor, but I asking that now for more years and there is until now no positiv reaction.... For your 2nd question you have only to define the "Result" if the Functionblock is defined somewhere else. |
I hope that the answer will help, if you have still questions, don't hesitate to ask me. |
|
1/23/2007 12:28 PM | |
Posts: 2348 Rating:
|
I can assign block header in SCL. I can assign block comment in SCL. Can i assign symbolic name -without defining it in SCL? I mean something like FUNCTION_BLOCK FB1 'My_first_block'. It would be great if when i compliled such source STEP 7 would add My_first_block as symbol name for FB1. But i'm afraid that's not possible. Am i right? |
1/23/2007 3:26 PM | |
Joined: 9/23/2005 Last visit: 3/31/2025 Posts: 4406 Rating:
|
Hi, you can use FUNCTION_BLOCK "my_block" in SCL. However, before compile it, you must define in the simble table that "my_block" corresponds to FB1. |
Denilson Pegaia |
|
1/24/2007 2:46 PM | |
Posts: 2348 Rating:
|
That's not the situation. I wanted to compile only SCL files without thinking what's inside Symbol Table ^) |
This contribution was helpful to
1 thankful Users |
1/24/2007 4:01 PM | |
Joined: 9/23/2005 Last visit: 3/31/2025 Posts: 4406 Rating:
|
Hi, in this case it's not possible use symbolic names to the FC/FB name. The SCL compiler must know wichtFC/FBnumber correspond asimbolic name. If this information is not present (symble table), it can't creatthis FC/FB. |
Last edited by: Pegaia at: 1/24/2007 4:04 PMDenilson Pegaia |
|
1/24/2007 4:05 PM | |
Joined: 3/6/2006 Last visit: 9/13/2024 Posts: 369 Rating:
|
Hi, STEP7 works with Blocks and their numbers and SCL does the same. If you don't want to assign the symbol name to the FC, there is a possibility within the options of the SCL-Compiler. In my German version, I can select "Extras, Einstellungen, Bausteine erzeugen, Bausteinnummer automatisch erzeugen". The english version is "Options, Customize, Create Block, Create block numbers automatically" With this options, the SCL-Compiler sometimes creates the items of the symbol-table itself. It looks for an unusedblock-number andincludes the new symbol(it doesn't work all the time, but often ;-) I've no idea about the reason, when it does work and when not ... Creating UDT worked every time. I hope, I could help you. Thomas |
This contribution was helpful to
3 thankful Users |
1/24/2007 4:11 PM | |
Joined: 9/23/2005 Last visit: 3/31/2025 Posts: 4406 Rating:
|
Hi, Ihave forgotthis tip. Very nice [;)] |
Denilson Pegaia |
|
1/25/2007 11:53 AM | |
Posts: 2348 Rating:
|
Good feature, but doesn't work with FB (and that's strange) :^) Well, this is clearly better then nothing^) |
We are working on a new user interface with better overview and more relevance.
Follow us on