Error when compiling PLC software

Hi,

I encountered this error when compiling my software in BnR studio. Does anyone know what could be the issue?

Error 5856: Different targets between caller (TRTB) and offsetmap.

Regards,
Kenneth

Restarting the project and fixing a compile error resolved issue. There was a stray character is one of my source files.

Hello @kenneth.tham

Firstly, congratulations on being able to find the solution to the problem on your own. I would like to give some extra information for another users who will experience this problem in the B&R Community.

While the B&R Automation Studio compiler is running, it creates a number of files in the folder where the project is located. These files are written in folders such as Binaries, Temp, Diagnosis according to their types. Any inconsistency you may experience here will cause your project not to compile. In such cases, as you will see in the error description on B&R Online Help, B&R recommends Clean Configuration and Build. The Clean Configuration process is actually equivalent to deleting the contents of the Binaries, Temp, Diagnosis folders.

Note that after this process, items such as display settings, saved screens and watch windows etc. kept under these files and they will be reset.

For example, after the Clean Configuration process, you should re-add the data you added to your watch table because the watch table interface is reset with the Clean Configuration.

In another example, if you clean the folders mentioned above while your project is closed, you will not be able to continue where you left off when you open the project. Details such as the last opened task and the last opened window are also kept in these files.

Best Regards,

Hakan

1 Like