This site uses cookies for functional purposes. To continue please read and agree to our Data Privacy.

By closing this message, you consent to our use of cookies on this device.

Share questions in our PLCnext forum

  1. Fabio Luis Girardi
  2. PLCnext Technology & PLCnext Controls
  3. Thursday, 03 May 2018
  4.  Subscribe via email

Some weeks ago, I participated in a basic presentation of PLCNext technology. And it has potential to be amazing! 

On this presentation, in a few minutes that I have to test it, I was able to load and run into a AXL F 2152 (via SFTP/WinSCP/SSH) a small program write in FreePascal (designed to run into a Cubieboard 2).

My question is: Someone besides me already tried this? Someone using a program running directly on Linux OS of the AXL F 2152 was able to access Inputs and outputs on the Axioline bus? 

I believe that this is possible, since that the "PLC program" runs over a Mono/.Net application that runs as service over the Linux OS. 

Yes, I known that using this method (program running directly into Linux OS) I'll lose (or I have to implement these) many features, like profinet, proficloud...

Accepted Answer
Frank PLCnext Team Accepted Answer Pending Moderation
1
Votes
Undo

Hi Fabio,

thank you for your post and we are pleased that you already can imagine how many different kinds of applications could be possible.

With the current version it is unfortunately not possible to directly access the local IO, we will implement a direct access with the next "bigger" firmware version (2.0) in november.
This API will allow to access the IO also from applications running in other Linux processes.

For now you've to use a workaround in terms that an ESM C++ program implements an interface (like REST) to transfer the datas.

Have a nice weekend!


Phoenix Contact Electronics Headquarter - Support Center

Fabio Luis Girardi Accepted Answer Pending Moderation
0
Votes
Undo

Hi @Frank!

Yesterday (21-ago-2018) I received an AXL F 2152 to test. And now, I have the time to do everything that I want. I see that the .Net/Mono process has some devices open, such as /dev/axio_xfer0 (that I can imagine as the Axioline communication bus, loaded through a Linux kernel module provided by Phoenix Contact).

I don't want to wait for the firmware 2.0 be released (because I'll no have the AXL F 2152 in November, my test period expires in September). 

So, is the /dev/axio_xfer0 the device that represents the Axioline bus? Or the I/O access is done via /dev/mem?

Can the Phoenix Contact provide a small C/C++ example of how access the Axioline bus directly, without wait the firmware 2.0 be released?

I have done some progress, reading some sensors (temperature and humidity) and LEDs from AXL F 2152, but my main target is to access the Axioline bus directly...

Frank PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo

Hi Fabio,

pity that the new firmware comes too late for you. frown

With FW 1.0 you've to go a workaround, one could be to implement as C++ PLCnext program a REST interface as a bride to the IO.

A few colleagues of mine did this a few month before, they alredy post the solution in this forum, but unfortunately it gets lost during the server crash.

However, I'll ask them to post the solution onces again, please give me a few days.

cu

Frank


Phoenix Contact Electronics Headquarter - Support Center

Marcel PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo

Hi Fabio,

as Frank has previously written, a direct access to the IO data outside of PLCnext is currently not possible. In order to access the data of the AXIO bus, it is currently necessary to make the detour via a separate interface that is supported both by PLCnext and by the external application.

As a REST interface we can recommend the REST SDK from Microsoft. This is excellently described and relatively easy to port to the controller.

C++-REST-SDK (Codename "Casablanca")

The sources include a CMake toolchain that can be easily used with the provided toolchain files. To connect the IOs, mechanisms of PLCnext in C ++ must be used (GDS + AddPortInfo or Subscriptions) and mapped accordingly to the self-implemented interface.

Alternatively, we have had good experiences with the zeromq framework. With zeromq you can build a socket-based communication to exchange data between applications.

ZeroMQ

Unfortunately, we do not have any code that we can provide, but I hope the information helps at least a little further.

 

Fabio Luis Girardi Accepted Answer Pending Moderation
0
Votes
Undo

Hi Frank, Marcel!

 

Sorry for taking to much time to reply.

 

So, your suggestion is, basically, use the PC Worx to:

  • Configure the Axioline bus;
  • Develop a small lib that will read/write IO's via a REST/ZeroMQ library and load it into PLCNext using PC Worx;
  • Develop into my app an interface to communicate with PLC software through interface chosen.

 

If yes, I think this approach has some advantages, such as accessing IO's in Profinet devices, right? The disadvantage is that if IO image changes (adding or removing some IO board), I must update my project and my library to reflect the new IO image.

 

But knowing that:

  • I want to access only the IO in the Axioline bus of the PLCNext (I don't want access IO's on the Profinet bus);
  • I know about the existence of the libaxio.so and their methods/functions, that suggests that this library handles the Axioline bus. 
  • I know about the existence of the kernel module, loaded at startup, authorship Phoenix Contact, that I can Imagine is the bridge between the Axioline bus (hardware) and libaxio.so.

 

Since the PLC software (developed in PC Worx) is loaded and executed by a Linux application, that runs at startup as a service, why my app can't do the same?

 

The question is:

The Phoenix Contact can share information about this lib/kernel module? 

OR NOT, information on this library/kernel module are properties of Phoenix Contact and cannot be shared?

OR NOT, writing your own app in this way will unlock much more power, such as processing and memory capabilities? 

 

If it can be shared, please let me do a try...

 

Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo

Hi Fabio,

Your description of the three steps is correct, but it is only necessary to use PC Worx Engineer for the first step:

  1. Using PC Worx Engineer, the I/O configuration must be prepared and downloaded . This creates the files that the AXC F 2152 needs to communicate with Axioline I/O modules (if any) and Profinet I/O devices (if any).
  2. Using Eclipse and the PLCnext plug-in, you can develop a small program that will read/write IO's on the Axioline bus, and then expose this I/O data via a REST/ZeroMQ interface. This does not require PC Worx Engineer - your C/C++ program can be copied to the PLC using WinSCP (for example), and then scheduled to run on the ESM simply by editing the relevant XML files. These steps are described in this Commuity article.
  3. Your FreePascal app can then communicate with your C/C++ app using the REST/ZeroMQ interface.

You are correct, this method has the disadvantage that new I/O must be configured in PC Worx Engineer. This new I/O configuration may break your C/C++ code ... depending on how you write it. It is possible for the C/C++ code to read the I/O configuration from the TIC files on startup, and then re-configure its GDS connections to the new I/O accordingly.

As mentioned in other replies, there is likely to be a more direct solution available with the release of the next major firmware version. Whether this involves the direct use of the libaxio.so shared library, I cannot say, since I don't have this information yet. I completely understand your point about how useful direct access to Axioline I/O will be - there are already many customers asking for this feature - which is one reason why it is scheduled for the next frmware release.

Unfortunately there is not likely to be any detailed technical information for this feature available until next month.

- Martin.

Phoenix Contact Electronics Headquarters - Support Center

Fabio Luis Girardi Accepted Answer Pending Moderation
0
Votes
Undo

Hi Marcel!

Can anyone inside of Phoenix Contact share the libaxio.so methods signatures (the libaxio .h file)?

Or this information is confidential?

 

The best regards, 

Fabio

Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo

Hello Fabio,

I've checked internally here and I'm afraid that we're not able to share details of the libaxio.so method signatures.

- Martin.

Phoenix Contact Electronics Headquarters - Support Center

Fabio Luis Girardi Accepted Answer Pending Moderation
0
Votes
Undo

Hi @Frank, @Marcel and @Martin!

Some news about Firmware 2.0? FW 2.0 was planned to be released in november/2018. Now (january/2019) I don't see it in the firmware download page. Some news? Is the FW 1.20 the firmware that was planned to be released in November?

 

The best regards,

Fabio

Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo

Hello Fabio,

There was a delay in the release of the firmware that was planned for November 2018.

We are expecting the next major firmware release for the AXC F 2152 at the end of February. This will have the version number 2019.0.

The current version of firmware is 1.20.

- Martin.

Phoenix Contact Electronics Headquarters - Support Center

  • Page :
  • 1


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

We have 109 guests and 2 members online