8/5/2024 8:00 AM | |
Joined: 11/26/2015 Last visit: 2/19/2025 Posts: 92 Rating:
|
Dear all, I have written a SCL function, with two outputs defined as Byte Array[1..999] & Word Array[1.999] respectively. After I compiled the SCL file, and inserted the generated FC into the program, I got a problem to assign the parameter for these two outputs. I have already pre-defined two arrays in a DB, as shown in the attached picture, Error_Data_Type as Byte Array[1..999] and Error_Code as Word Array[1..999]. But when I tried to assign these two arrays to the outputs 'Q_ERROR_DATA_TYPES' & 'Q_ERROR_CODES' of FC212 on the right, I got an error, and the information was 'Declaration range of the actual side does not fit the formal declaration range VAR_OUTPUT of the formal parameter Q_ERROR_DATA_TYPE.' In my SCL function, I declared the arrays as below: Q_ERROR_DATA_TYPE : ARRAY[1..999] OF BYTE; Q_ERROR_CODES : ARRAY[1..999] OF WORD; Does anyone have any idea why there was such error? Thanks. |
8/16/2024 7:00 AM | |
Joined: 7/26/2008 Last visit: 4/2/2025 Posts: 105 Rating:
|
Hi kevinlin_5, I got the same result, but tried the symbol instead. Try: "Diagnos_MBTCP_DG03".Error_Data_Type Also get into the habit of using Array index starting from 0, because the SCADA will start at 0. ARRAY[0..999] instead of ARRAY[1..999]. Good luck! |
We are working on a new user interface with better overview and more relevance.
To explore the new Forum, you can follow the textbox in the right column, which will lead you to the corresponding page in the new Forum. Alternatively, you can start from the main page by following this link:
https://sieportal.siemens.com/en-ww/support/forum
In the coming days, we will update the configuration step by step, so that you are directed to the new Forum by default. The “classic Forum” will remain available for all known functionalities alongside the new one.
We are thrilled to finally share the future of our Forum with you. Thank you for your commitment!
Kind regards,
the Forum Support Team
Follow us on