Portenta PMC PLC IDE

Hello,
Just started yesterday with the PLC IDE,
I must admit the documentation and examples are pretty much inexistent or hard to find.
I was able, after too much frustration, to download the first manual code and activate the PLC license (about 4 IDE freezes, 3 computer reboots which magically solved some compile errors ) and so many bad connections to the com port.
So finally I decided to connect a PT100 and the required short wire to the third pin and compile a project and upload it.. but It only shows 0 as both resistance and temperature on TP00.. I tried to redeclare TP00 in every possible shard variable input or output.. or global.. I mean it s all very obscure and without examples it is difficult to understand what is input and output because there isn't even a schematic to say what is considered in and out and how the flow direction has been defined by the developpers. Is it from the PLC to main sketch or the opposite.. as you see it s easy to get lost...

I do see the cnt in the oscilloscope and watch which works well, and increases.. but the temperature seems very much dead.. is there something I need to enable except declaring a global variable..

I don't even see minimal examples projects like I am used to in the standard Arduino IDE.. this would at least validate that everything works correctly. And give hints on what and where things shall be.. Where are the examples, do they exists?
My impression is that the developpers presume, because they have been in it for so long, that kick-starting is easy and that it is simple to find example and documentation.. but honestly it is not.. even when coming from the Arduino IDE, the PLC for the PMC is very exotic and needs a lot more documentation to make it approachable, so far my experience is very tough.

A few simple example projects to get started would be so much welcome.
Because I don't even know if it is a a problem with my PT100 connection or variable or a bug in the IDE or what else..

Please just consider this as a first impression after 5 hours of messy experience, I am convinced that everything will get easier in a couple of hours.. but I wanted to give you my first impression and feedback on my experience so far...

Thank you for all the amazing tools you build, I understand the PLC IDE is very new and I have no hard feelings at all in any cases.. and I wish you all a happy new year.

Hi, @theshade

I'm working on building my own documentation as I go and am happy to share what I find if you have a specific question I can answer.

One thing I would start by doing is downloading and installing the latest PLC IDE Tools (0.29). I haven't had a chance to test it on hardware just yet, but I took a cursory look at the target files being generated by the IDE since installation, and they have been modified to possibly fix some of the absent IO. If you ever need to reinstall the IDE Tools, you need to fully uninstall the previous version and do a new install - a repair does not seem to correct issues in an existing install.

The quickest way to start understanding how to address the IO is to open the Resources tab of the Resources pane on the left of the IDE window:

From there, if you open the DigitalInputs mapping, you'll see how you go about addressing each point in your programming:

In a ladder program, you would fill in normally open contacts with the enumerated address:

You can also place a variable reference in the DigitalInputs mapping so that a descriptive name can be used instead of the address:

Returning to the ladder example, the NO contact can then be edited to reference the point by the symbolic name:

Here's a structured text example referencing the same input point:

Capture8

Take note that the IO mapping "Name" column values aren't usable in code and will generate an error upon compile. You need to place your own name in the Variable column, instead:

The same principle applies to the digital outputs, analog inputs/outputs, and the programmable digital IO. In my and others' case, the underlying hardware target seemed to have been missing the %IX0.0 point, but may have been updated in IDE Tools 0.29.

The encoder inputs' addresses can be located under the project Library Tree on the right of your IDE window: Project libraries -> Target -> Target variables -> I_O

You can press the F1 key in the IDE to bring up the manual.

The manual is also located here:
C:\Program Files (x86)\Arduino PLC IDE\Arduino PLC IDE\Docs

2 Likes

Dear Jeremy,
thank you so much for your reply, your support is very much appreciated.. and the user community seems great and helpful!!

I will check the version of my tools but since I installed yesterday I expect it to be the latest,
Also it seems that the temperature variables can t be "named" like the others at least they miss the column to do so.
Yes I have seen the ressources tabs and the address so that I got semi familiar with it. I will start playing with the DI DO soon. But I just wanted a simple example that showed how to use the PT100 and show the measured value in the oscilloscope and was surprised to not see any example at all. Only one or two simplistic guides or walkthrough on the internet, but nothing of great value.
A repository with 10 or so projects touching all aspects of the boards DI, DO, MODBus, WiFi, etc would just seem natural for a board which costs 10x the price of an Arduino Due.

No problem.

You also set the IP of the controller in the Arduino Sketch itself. I haven't tried using the shared variables yet, but I expect that "Inputs" are written by the sketch and read by the PLC runtime and vice-versa for "Outputs".

The atomic types seem to be the only ones supported:

1 Like

Nice documentation, Jeremy! Do you know if you can modify the Sketch and add your own C++ code? I'm not seeing any I2C function in the IDE so I'm thinking this would be the only way we can access them.

You can.

Hey all, @jeremym1987 seems to be really on top of this, awesome stuff!

I've also been working on a little bit of documentation, only up through the use of analog stuff so far, and trying to meet and overcome any challenges that might help others.

Hi, in have the same problem. No pt100 reading possible. Enabled all of them, some start indicating something when a pt100 is connected, but definitely not the right value. I had to buy a pt100 to 4-20 ma converter to get my program working. Strange for something that is already 1,5 year on the market. I also have my system suddenly stopping communicating after some sketch update. The only way to get out of that loop, is starting a new project. So my advice: don't use it in professional applications. It will be in the machine until beckhoff supplies me with the real stuff

hi Peter, appreciate your docs, it is much better than the tutorial on Arduino site.


I have been in nightmare debugging my first program when could not resolve the compile error when the Input tags could not be found (object not found). Have you ever experienced this similar issue ? I am using Global tags inside a Function to map the Input tags which were assigned from Input configuration.

HI,
did some get a possibility to read write the Shared Variables ?