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

  1. Arne Smets
  2. PLCnext Engineer
  3. Thursday, 17 October 2019

Hello,

I make use of the 2019.9 SDK and PLCNext engineer. I've created a small simulink program, but Engineer gives the error plcnext007: library not supported by device.

The generated file is stored in:C:\Users\Public\Documents\Phoenix Contact Libraries\PLCnext Engineer\Simulink_Export\2019.9.

The last folder is automaticly created, so it should be compatible with a 2019.9 controller, as selected that target . I tried replacing the controller with 2019.0, but that also doesn't fix the error..

The SDK does work with eclipse.

 

Arne

Oliver PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo

Hello Arne,

please make sure that your PLCnext Engineer Project has a 2019.9 Template selected.
https://www.plcnext-community.net/index.php?option=com_fss&view=faq&tmpl=component&window=1&faqid=100&Itemid=433&lang=en

Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support
  1. more than a month ago
  2. PLCnext Engineer
  3. # 1
Arne Smets Accepted Answer Pending Moderation
0
Votes
Undo

" so it should be compatible with a 2019.9 controller"

 

I've selected the 2019.9... That's why I think it's strange

  1. more than a month ago
  2. PLCnext Engineer
  3. # 2
Philipp Dauer Accepted Answer Pending Moderation
0
Votes
Undo

Arne,

did you select on both sides the 2019.9 FW? So you must compile for 2019.9 with 2019.9 SDK (from your initial questions i suppose you did this) and you also have to change the controller template in PLCnext Engineer to 2019.9 template. You can do this with opening the network node in PLCnext Engineer, go to the AXF F 2152 Rev >=00/2019.9 controller and click on it while pressing "SHIFT" and move the controller from this controller to your actual controller in the plant view to change it from other FW than 2019.9 to FW 2019.9

SelectController -------> Drag and drop to controller in plant node while pressing SHIFT  ChangeController

 

  1. more than a month ago
  2. PLCnext Engineer
  3. # 3
Arne Smets Accepted Answer Pending Moderation
0
Votes
Undo

Yes I did this. I also tried to switch everything (SDK, FW and selected controller in Engineer), to the LTS version. Due to the SDK I am able to choose the right version in Simulink, but in no combination I'm able to make it compatible for the AXCF2152

  1. more than a month ago
  2. PLCnext Engineer
  3. # 4
Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo

Hi Arne,

Can you please upload your PCWLX file to this share file location:

https://phoenixcontact.sharefile.eu/r-r4e642c7badd441a8

Can you also please give screen shots of all your settings, including:

The exact target you have selected in Simulink, before building the PLCnext Engineer library:

 

Model Configuration 2

 

Exactly what version of the PLC you have selected in PLCnext Engineer?

 

22 10 2019 14 37 25

 

What is the output from the following two commands on the development machine:

 

22 10 2019 14 41 07

 

Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support
  1. more than a month ago
  2. PLCnext Engineer
  3. # 5
Arne Smets Accepted Answer Pending Moderation
0
Votes
Undo

Hi Martin. Screens are in the attachment. I got the error "library does not support controller.

Arne

Attachments (3)
  1. more than a month ago
  2. PLCnext Engineer
  3. # 6
Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo

Hi Arne,

I think we finally have a solution.

Can you please try the following steps:

  1. Uninstall all SDKs, using the command plcncli set setting SdkPaths Path/to/sdk --remove for each SDK you have installed.
  2. Confirm that all SDKs have been removed, using the commands plcncli get sdks and plcncli get targets.
  3. Delete all the directories containing the SDK files.
  4. Re-install the SDK(s) using the command plcncli install sdk -d C:\PLCnext\SDK\AXCF2152_2019.9 -p path/to/axcf2152.tar.xz.
    *** IMPORTANT ***
    When specifying the path to the SDK, please use the exact directory format shown in the screen shot below - including the underscores. So for AXC F 2152 2019.9, the SDK directory should be exactly as shown in the last line of the screen shot.
  5. In Matlab, you should now see the Target (in the drop-down list) with the name corresponding to the SDK directory.
  6. Build the PLCnext Engineer library.

sdks

Hopefully, this library can be added to the PLCnext Engineer project.

The problem appears to be a combination of (a) the build process for the PLCnext Engineer library, which (apparently) uses an unreliable method of setting the target controller, and (b) the absence of a useful error message in PLCnext Engineer, which would have helped enormously.

In any case, please let us know if this works for you.

Martin.

 

 

 

Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support
  1. more than a month ago
  2. PLCnext Engineer
  3. # 7
Arne Smets Accepted Answer Pending Moderation
0
Votes
Undo

I deleted all the SDKs, I checked with get sdks and get targets and none appeared. Checkpoint for that step.

After that I reïnstalled the SDK. That was succesfull: output attached, also checkpoint.

Then I restarted the whole PC because it couldn't find a target in simulink... But still none appear 

I reopened the matlab add-on installer and did that installation again, but no difference.

I get this warning in Matlab: (also in background attachment)

 

Warning: No target types were found for pxc_hlli.
> In PCWorx.getTargetInfo
In PCWorx.Config.grtOptions
In coder.internal.stf.FileReader/parseSettings
In coder.internal.getSTFInfo
In stf4target (line 43)
In stf2target (line 81)
In RTW.TargetBrowser/uploadTarget
In targetBrowserCloseCB
In rtwprivate (line 16)
Warning: No target types were found for pxc_hlli.
> In PCWorx.getTargetInfo
In PCWorx.Config.grtOptions
In coder.internal.stf.FileReader/parseSettings
In coder.internal.getSTFInfo
In configset.internal.data.ConfigSetAdapter/setupTLC
In configset.internal.data.ConfigSetAdapter/resetAdapter
In configset.internal.util.resetHTMLView
In configset.internal.util.refreshDialogs
In RTW.TargetBrowser/uploadTarget
In targetBrowserCloseCB
In rtwprivate (line 16)
Warning: No target types were found for pxc_hlli.
> In PCWorx.getTargetInfo
In PCWorx.Config.grtOptions
In coder.internal.stf.FileReader/parseSettings
In coder.internal.getSTFInfo
In stfInitTarget (line 31)
In RTW.TargetBrowser/uploadTarget
In targetBrowserCloseCB
In rtwprivate (line 16)
Warning: No target types were found for pxc_hlli.
> In PCWorx.getTargetInfo
In PCWorx.Config.onSetTargetType
In PCWorx.Config.onStfSelect
In stfInitTarget>loc_eval (line 137)
In stfInitTarget (line 118)
In RTW.TargetBrowser/uploadTarget
In targetBrowserCloseCB
In rtwprivate (line 16)
Warning: No target types were found for pxc_hlli.
> In PCWorx.getTargetInfo
In PCWorx.Config.grtOptions
In coder.internal.stf.FileReader/parseSettings
In coder.internal.getSTFInfo
In configset.internal.data.ConfigSetAdapter/setupTLC
In configset.internal.data.ConfigSetAdapter/resetAdapter
In configset.internal.util.resetHTMLView
In configset.internal.util.refreshDialogs
In RTW.TargetBrowser/uploadTarget
In targetBrowserCloseCB
In rtwprivate (line 16)

So where going on into the next problem haha. I can't remember/find a way to select the SDK directory in Matlab, it should find it automaticly if I'm not wrong.

 

 

Arne

Attachments (1)
  1. more than a month ago
  2. PLCnext Engineer
  3. # 8
arman.ghasaei@mail.utoronto.ca Accepted Answer Pending Moderation
1
Votes
Undo

Hi Arne,

The reason you cannot see the target in Simulink is because the environment variable is not defined properly in your Windows. You should:

Open Control Panel > search for environment and then select "Edit the system environment variables" then selec "Environment Variables" again in the new page and in the upper page , i.e., user variables for .........., select New and add 

Variable name: PHOENIXCONTACT_SDK_ROOT

Variable Value: C:/PLCnext/SDK/

Then restart your PC, open MATLAB and you will see the target.

  1. more than a month ago
  2. PLCnext Engineer
  3. # 9
Arne Smets Accepted Answer Pending Moderation
0
Votes
Undo

Thanks!! I forgot about this step. Since I created a new folder, the old variable had the wrong directory!

  1. more than a month ago
  2. PLCnext Engineer
  3. # 10
Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo

Doh, I missed that step in my instructions (sorry).

Let me know if this fixes the problem for you.

Martin.

Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support
  1. more than a month ago
  2. PLCnext Engineer
  3. # 11
Arne Smets Accepted Answer Pending Moderation
0
Votes
Undo

It does fix the problem! What was exactly the cause? Because the SDK did work for C++ in Eclipse.

  1. more than a month ago
  2. PLCnext Engineer
  3. # 12
Martin PLCnext Team Accepted Answer Pending Moderation
1
Votes
Undo

Hi Arne,

I'm not familiar with the internals of the PLCnext add-in for Matlab Simulink, but it appears that it uses an unreliable method of setting the target controller in the PCWLX library (using the name of the directory where the SDK is installed). The add-in for Eclipse uses a more reliable method of setting the target controller (using information in the SDK itself), so we do not see the same problem there.

I expect that the developers of the Matlab Simulink add-in will implement a fix for this "feature" in a future release.

Martin.

 

Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support
  1. more than a month ago
  2. PLCnext Engineer
  3. # 13
arman.ghasaei@mail.utoronto.ca Accepted Answer Pending Moderation
0
Votes
Undo

Happy to hear that Arne. I believe you can see the target in MATLAB/Simulink; however, do you still have the library incompatibility issue? I still have that issue in my version of PLCnext Engineering.

Arman

  1. more than a month ago
  2. PLCnext Engineer
  3. # 14
Arne Smets Accepted Answer Pending Moderation
0
Votes
Undo

Nope, mine is gone right now. I'm not sure what the difference is in the SDK installation, except for the names of the directories.

 

  1. more than a month ago
  2. PLCnext Engineer
  3. # 15
  • Page :
  • 1


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