Hallo, I´m trying to build my second c++ project for the axc f 2152 (PLCnext starter kit).
As my PC Worx Engineer has german language I try to translate my actions in English.
After finishing the example Project from YouTube I wanted to add some new port variables to my c++ Code.
MyProg.hpp: [..]
private: // fields
> //digital Ports
> //input I
> Bit I_bool_0;//use one bit! bool is 8 bit in cpp
> Bit I_bool_1;//use one bit! bool is 8 bit in cpp
> Bit I_bool_2;//use one bit! bool is 8 bit in cpp
> Bit I_bool_3;//use one bit! bool is 8 bit in cpp
> Bit I_bool_4;//use one bit! bool is 8 bit in cpp
> Bit I_bool_5;//use one bit! bool is 8 bit in cpp
> Bit I_bool_6;//use one bit! bool is 8 bit in cpp
> Bit I_bool_7;//use one bit! bool is 8 bit in cpp
> //output Q
> Bit Q_bool_0;//use one bit! bool is 8 bit in cpp
> Bit Q_bool_1;//use one bit! bool is 8 bit in cpp
> Bit Q_bool_2;//use one bit! bool is 8 bit in cpp
> Bit Q_bool_3;//use one bit! bool is 8 bit in cpp
> Bit Q_bool_4;//use one bit! bool is 8 bit in cpp
> Bit Q_bool_5;//use one bit! bool is 8 bit in cpp
> Bit Q_bool_6;//use one bit! bool is 8 bit in cpp
> Bit Q_bool_7;//use one bit! bool is 8 bit in cpp
>
> //analog Ports
> //input I
> uint16 I_analog_0;
> uint16 I_analog_1;
> //output Q
> uint16 Q_analog_0;
> uint16 Q_analag_1;
> };
Then I inserted Program Ports at position in MyProg.cpp and generated Metaconfig. In MyProg.progmeta I checked Input/Output ports. Afterwards I included the new lib in PC Worx and pushed it to a Task.
Then I connected some example Ports.
But when i build and write the project to the PLC, it stops working.
I can ping it, I can find it in “online-devices” but i cant do much more.
No WebBasedManagement, no login, no online-values.
No more red blinking LEDs on the PLC.
Power down/up the PLC does not change anything. I had to reset the PLC (Reset Type1) to get the connection working again.
Afterwards I tested it again with the same result… Edit:
The supported Datatypes table is really confusing…
1 digital in/out → Bit or bit?
8 digital in/out / 1 in/out Byte → uint8
1 analog output → uint16
Thanks for your help,
JimmyPesto
Hello, This may be a problem with incompatible versions of Firmware, PC Worx Engineer and/or SDK. Can you please list the version numbers that you’re using? Also, after the problem happens, can you please copy the Ouput.log file and attach it? And yes, I agree that the table is confusing. There will be a new version of documentation with the release of the next major software / firmware update, in November. - Martin.
Thanks for your quick answer.
Eclipse neon.3 (Release 4.6.3)
In Eclipse I have the following PXC Software installed: AXC F 2152 Toolchain 1.0.0.201711221106 com.phoenixcontact.cdt.toolchain.axcf2152.feature.feature.group PHOENIX CONTACT GmbH & Co. KG
PLCnext CDT Common 1.0.0.201711221106 com.phoenixcontact.cdt.common.feature.feature.group PHOENIX CONTACT GmbH & Co. KG
PLCnext Editor Utils 1.0.0.201711221106 com.phoenixcontact.cdt.utils.feature.feature.group PHOENIX CONTACT GmbH & Co. KG
PLCnext Schema and Tools 1.0.0.201711221106 com.phoenixcontact.cdt.meta.schema.feature.feature.group PHOENIX CONTACT GmbH & Co. KG
PC Worx Engineer → 7.2.2 (build 3.11.10054.0) Linux Kernel:
uname -r → 4.9.35-rt25-pxc
Can you tell me an easy way to check the version of Firmware and SDK?
You cant upload .log or text files here, so I converted the .log to PDF.
Greetings,
JimmyPesto
Output.pdf
You can check the firmware version either from PC Worx Engineer: https://www.plcnext-community.net/index.php?option=com_fss&view;=faq&tmpl;=component&window;=1&faqid;=74&Itemid;=272⟨=en … or from the PLC itself: # cat /etc/plcnext/arpversion (the “Arpversion” is the one we’re looking for). However I can see from the log file that the Firmware version on your PLC is 1.0.0.250, which is an earier version that isn’t compatible with the latest software. Please download and install the version 1.20 firmware package from our website: http://www.phoenixcontact.com/global/products/2404267 (then navigate to Downloads → Firmware) The exe in the ZIP file installs the firmware package on Windows, and includes the firmware file, Release Notes and User Manual. Appendix A in the latter explains how to perform the update. - Martin.
Great I will check on that next week.
Thanks for your support! Edit:
I now have Firmware 1.2.0.51 up and running.
Compiling and writing a project seems to work without freezing the PLC.