Hello, I have Matlab 2018b, PC Worx Target for Simulink v1.40 installed on my computer. Tried to build the tutorial model but got an error “unable to find Members within the CGType scope”. I checked the compatibility and it is fine. I just found out that Target v1.30 has AXC F 2152 add-on in it while v1.40 doesn’t. Is Target v1.41 available to download? I know installing Target v1.30 and Matlab 2016b would fix the issue but is there a way around it? Thanks.
Hello, since version 1.40 the installer does not contain PLCnext SDKs any more, but comes with the PLCnCLI. The required SDKs need to be installed manually using the PLCnCLI. Therefor you have to download the required SDK package of the target from the Phoenix Contact website and use the command plcncli install sdk -p “path-to.tar.xz” -d “destination-path” from the command line. After that you might need to restart Matlab and select the installed target SDK in the model configuration. Kind regards
Daniel
Thanks will try this out
Hello, After installing the PLCnext CLI for Windows, you must either (a) execute the plcncli command from the directory where you installed the plcncli program (default is C:\\Program Files\\Phoenix Contact\\PLCnCLI 2019.0 LTS), or else (b) add this path to your PATH environment variable. When executing this plcncli command, please install the SDK (via the -d parameter) in a directory that does NOT have spaces in the path - e.g. C:\\SDK\\AXCF2152\\2019.6 Hope this helps. - Martin
Thanks Martin. How do I use this sdk in Simulink. I followed the tutorial but I am using Target for Simulink v1.40 which only shows RFC470 and RFC 480 in the configuration parameters (HLLI Target settings).
Hello, The path to plcncli does actually have to be in the windows PATH. You can do this from the Windows Control Panel, following the steps in the video below, and then restarting the PC. You should then see the AXC F 2152 in Simulink.
I did set the plcncli to be in the windows PATH and restarted my computer. I still can’t find AXC F 2152 in configuration parameters (Simulink). I am following the tutorial video (https://youtu.be/4eEvbAug7rs) step by step. I am using Matlab-Simulink version (2018b), PLCnext Engineer 2019.3, PCWORX Target For Simulink (v1.40), PLCnCLI 2019.0 LTS, installed SDK package for windows. I double checked with the compatability chart (attachment below). How do I set the target file in simulink to AXC F 2152?
Hello, the screenshots seem to be correct. The target selection is described in the documentation, but may lead to some confusion because there is only one system target file for all phoenix contact controllers. It is irrelevant if it is a standard PLC or PLCnext target.
Check your installation environment. Check the installed SDKs with the commandline command “plcncli get sdks”. The output should look similar to the following screenshot, depending on the SDKs you have installed on your host system. If your SDK is not listed, you might need to add it with the command "plcncli install sdk and the appropiate -p and -d parameters as described in the plcncli documentation.
2) Start Matlab and create an empty model 3) Open the model configuration dialog and select the system target file “pxc_hlli.tlc” and apply. (The view might differ depending on your Matlab version)
The configuration dialog should be extended automatically with several “HLLI” configuration pages in the Code Generation section. The name “HLLI” will change in a future version when classic controllers are not supported any more. In the section “HLLI Target Settings” you will find the targets as listed in the PLCnCLI. There you only need to select the SDK which shall be used.
If this also does not work, there are two undocumented options to register an SDK. Please note, that these options may be removed in a future version. Unpacking the SDK can be done manually or with the PLCnCLI. After the following steps a restart of matlab is required. 1) Unpack the SDK to any directory of your choice (Attention: Maximum path length of Windows is limited to 255 characters) and execute the command “PCWorx.setupSdkRoot” from the matlab command window. This command creates an alternative environment variable referencing to a root directory where SDKs are installed. On my system (example above) this would be "D:\\SDK". 2) Unpack the SDK to the “targets” folder in the installation directory of the toolbox. The name should contain the controller name and the SDK version (for example “AXCF2152_v2019.0”)
