Skip to content

C# access AXL PDI and Profinet read record and write record in programm

I try to write an application in C# for the AXC F 2152 and/ or AXC F 3152. In this application I want to access acyclic PDI services and Profinet read record and write record. Is this possible? In the .chm help many methods corresponding to IO are marked as obsolete and pointing to new methods that are not described. So I hoped I can switch from C++ to C#

Comments

  • Since you will need to run one or more instances of the C# program in a PLCnext Engineer project, one possibility is to also create an instance of the PDI_READ, PDI_WRITE, RDREC and WRREC FBs in an IEC language worksheet, and then pass data between your C# program and these FBs.

    Would that be a suitable solution for your application?
  • It could be a work around, but it is not preferred. We try to avoid using several programming languages and looking for alternatives to ST in Engineer and want to program in High-Level languages. Also debugging will be to complex.
    So I think we need to stay with C++ and C# no alternativ to us.
    Do you know if it is possible to debug C++ with Visual Studio? Eclipse is not a good alternativ to VS.
  • Unfortunately we do not currently support the calling of PLCnext Engineer function blocks from C# POUs that target the eCLR.
    Do you know if it is possible to debug C++ with Visual Studio?
    Yes. Please see this new Makers Blog post:
    https://www.plcnext-community.net/makersblog/how-to-debug-c-components-and-programs-in-visual-studio/
    (sorry about the formatting, but I hope the procedure is clear).
Sign In or Register to comment.