Exporting AML from PC-WORX fails due to INTERBUS
Hello experts!
I am currently investigating the possibilities (and impossibilities) regarding the conversion of an existing PC-Worx program to PLCNext. From this forum and some other internet posts I understand that 'the way to go' would be to export the program as .AMLX file and then import that into PLCNext.
I have downloaded the latest PC-Worx version and also installed the AML_Export function. So far, so good. After rebuilding the program, I can start the Export to AML function. Unfortunately, it stops, throwing this error:
How can I proceed? At this moment, no .AMLX file is generated at all 😥.
Comments
Hi WimVriend,
the AML Export for PC WORX projects was mainly created due to the discontiuation of the 300 class PLC's.
To be able to export your project from a RFC controller, you must "replace" the RFC470 by an ILC3xx controller in PC WORX.
Sure, the IBS part will get lost, but Profinet should stay.
If you dont have any Profinet parts, its better to use the PLCopen XML export to import your code into PLCnext Engineer and do the hardware configuration again in PLCnext Engineer.
Kind regards
Carsten
Here is the answer from the Controls Support team:
please keep in mind.
Currently the export of the Interbus remote bus is not possible.
Follwing procedure is possible:
System differences:
- FUs for explicit type conversion are no longer available.
E.g. INT_TO_DINT() -> Use generic FUs e.g. TO_DINT() Data type TIME has changed -> 32 bit signed! Format specifier for character string conversion has changed. -> Old format identifiers are no longer compatible!
E.g. TO_STRING(iVariable, 'Number: {0:d}'); Old ProconOS MEM*/IMEM* drives are no longer available. -> Replace with MEMORY_COPY / MEMORY_SET.
- Strict typing! Memory area beyond the linked variable cannot be addressed. -> Memory access beyond the type limit is no longer possible.
- IP blocks have changed. -> Reimplement with TLS_SOCKET_2. System event tasks are not automatically converted. -> Create manually A free-running task watchdog is not accepted, only the set watchdog time is accepted. -> Set watchdog to 0 to deactivate it.
- When importing global variables, do not import the system variables. These overwrite the assignment of the existing system variables.
- The system variable PLC_SYS_TICK_CNT is no longer available -> create your own millisecond counter.
- The system variables of the system time RTC_* are no longer available -> time is available via the global variable RTC. This is now a structure.
- The Instruction List (IL) programming language is no longer available -> code must be converted manually.
Hello @Carsten PLCnext Team and @Martin PLCnext Team ,
Thanks for your replies!
It took some time for me to try things myself, but now I think the path is clearer. Actually the CPU type of the existing project is an RFC430, but that does not really matter (I think). As @Carsten PLCnext Team suggested I started by using the 'Replace' function to use an ILC330 controller. But I'm not sure that really helps: the wizard prompts for a replacement INTERBUS interface and then neatly rewires the existing cards to the new interface. When I run the 'Export AML' function after that: it stops (this time with an 'internal error').
So I decided to abandon the AML-path, because it seems to lead me nowhere. 🙄
As @Carsten PLCnext Team also suggested, it may be best to migrate the hardware configuration manually and use PLCOpen to migrate the code. So I started the 'PLCOpen export' function and the noticed that the 'Save file as' dialog offers the option to select 'V101_ext' in the dropdown list. That works! I also tried the V210 option, but PLCnext is not ready for that (yet?).
So at this point I am able to read the PLCOpen V101_ext file into PLCNext. Unfortunately that is not 'the end of it': there are many old functions which were renamed or are 'not supported' any more. It's not as 'plug-and-play' as I hoped 😓.
Hello @Martin PLCnext Team and all,
OK, I have received some more information and now I understand your answer (a bit more). One must export the .amlx file from PC Worx and then use that .amlx file as input for the 'Project converter'. My problem is obvious: I cannot export the .amlx file in the first place!
Apparently my old PC Worx project does have Interbus remote bus nodes, so the initial export fails. Is there no known 'work-around', for example replace the 'Interbus remote bus' with another type?