PLCnext on LinkedInPLCnext on Instagram  PLCnext on YouTube Github PLCnext CommunityStore PLCnext Community

  1. meewis
  2. PLCnext Engineer
  3. Sunday, 13 September 2020

Dear all,

Just did a migration from PCWorx 6.2 to PLCnext Engineer. That works. But now I get a lot of errors due to unknow functions like 'int_to_real', 'byte_to_word', etc.Is there a library that I can implement so that I don't need to redo all my code? Or maybe an other solution, like making my own convertion library (how do I do that?).

Kind regards, Wilco

Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo

Hi Wilco,

That's a great question. I'm fairly sure that there is currently no PLCnext Engineer library that converts PC Worx functions to PLCnext Engineer functions, but that would be very useful.

If you were to create your own library, you would start with an empty project, add one Function or Function Block for each PC Worx library - making sure the signature (i.e. parameter list) is identical to the PC Worx block - and then inside the Function or Function Block, call the corresponding PLCnext Engineer library.

I did a short video showing how to create an FB library in another thread, here:

https://www.plcnext-community.net/en/discussions-2-offcanvas/banner-k50-io-link.html#reply-5956

If you end up creating a library like this, it would probably be useful to others, so you might consider sharing it in the PLCnext Store.

Regards,
Martin.

Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support

meewis Accepted Answer Pending Moderation
0
Votes
Undo

Hi Martin, thanks for your suggestion. I will start to make the convertion lib. Kind regards, Wilco

Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo

Hi Wilco,

I have been chatting with some of our library developers about this topic. In the past they have tried building a PC Worx => PLCnext Engineer "adapter" library, but in the end they decided that it was easier to simply edit the source code and replace the PC Worx functions with the equivalent PLCnext Engineer functions. To assist with this, there is a "checklist" that our developers use, listing all the PC Worx functions that must be changed when importing into PLCnext Engineer.

With your permission, I can send this checklist to your email address, if you think it will be useful.

~ Martin.

Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support

meewis Accepted Answer Pending Moderation
0
Votes
Undo

Hi Martin,

Yes please send me the checklist.

Als just started to make the PCWORX LIB; for example to handle this: 'Data := byte_to_int(A)'. I made a FunctionBlock with to_int with a input of the type byte and an output of the type int. When I inplement my lib this line get's an error that says: 'byte_to_int' is not a valid function. Why??

Kind regards, Wilco

Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo

Hi Wilco,

If you have created byte_to_int as a Function Block, then you will need to create at least one instance of that FB.

I think it would make more sense to create byte_to_int as a Function, in which case no instances are needed (or possible). The function only needs to call the PLCnext Engineer TO_INT function, so this should work OK.

Regards,
Martin.

Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support

  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.