Problems with the Export

Top  Previous  Next

 

If you get error messages while translating in the STEP ®7 source editor these will be type conflicts in most of the cases. Errors will also occur if you have programmed recursively, that means that a block calls itself directly or indirectly. You cannot get rid of this error, recursiveness is not permitted in STL-sources. Finally there can also be an error in TrySim itself. Sometimes STEP ®7 criticizes also type conflicts that are not existing.

 

In every case you should deselect the check box ‘Create Blocks only with correct Translation’ in Options|Customize|Source Files while translating the source. Often it is possible to translate the source at the second or third try because more and more of the called blocks are existing. This multiple translating will only be necessary if you export a program to STEP ®7 for the first time. If you do changes in TrySim later and export the program again all blocks will already exist and there will be no error messages. Often it is useful to import the symbol table in STEP ®7 first because some instructions can only be displayed symbolically.

 

Type conflicts

These result from the fact that in TrySim the data type check is not that strict as in STEP ®7. In TrySim you can connect all actual-parameter which have got the same size as the formal-parameter to function blocks. But STEP ®7 accepts only the actual-parameter which have got exactly the same type as the formal-parameter. So the transfer of an variable that is declared as INT to a parameter declared as WORD is not permitted although both are 2 bytes big. So if the STEP ®7 – compiler reports type conflicts you will have to check the types in TrySim and adjust them correspondingly.

By the way, this has got the advantage that the accu-representation can be better selected while monitoring STL-blocks.

 

Recursive Calls

If you call a FB you will have to specify the instance DB. This one is created correspondingly to the FB header and so it has to be in the source after the FB declaration. Because the source compiler of STEP ®7 does not create the instance DB automatically (like normally in the editor) the instance DB will not exist yet if a FB calls itself. That is why recursive calls are not translateable in STL-sources. Please avoid that a block calls itself what is also not permitted according to IEC 61131-3.

 

Error in TrySim

Finally it is also possible, unfortunately, that we have made a program error and the right syntax is not created in the source. If you have a good command of the source syntax you will be able to get rid of the error in the source, if not you have no choice but to find the faulty position in the source editor (double click the error message), identify the corresponding block and generate the source in TrySim again, but without the faulty block. You have to enter this one by hand before translating in STEP ®7. If such an error occures please contact us so that we can get rid of it in the next release of the program. Here is our e-mail-address.

 

See also:

Export the Program

Export the Symbol Table

Import and Export in General

 

STEP®7 is a registered trademark of the Siemens AG.