Arduino Machine Control Library References

I am fairly new to Arduino and I purchased the Arduino Machine Control which uses a Portenta H7. However, I am finding documentation for programming to be difficult and the reference to libraries goes to GitHub and GitHub points back to Arduino (circular reference). I was expecting more from Arduino's Pro line but right now, I am having problems even learning how to code it.

Also, I tried using a DHT22 with the Machine control with now success. There is one thread on this already that has been closed with no answers. Looking for insight here if anyone has experience or references for using the Machine Control please respond here.

Hi @mecheng2002. Are you using Arduino IDE or Arduino PLC IDE to program the Portenta Machine Control?

Are there specific libraries you are looking for documentation about?

I am using Arduino IDE 2.0. The analog and digital commands are different in the examples I’ve found on GitHub. I was able to get the analog outputs and inputs to work with some success but not able to get any digital inputs to work.

The example sketches are lacking given there are new commands or functions to use with the Machine Control options and I have found no documentation on these new analog options.

Hi @mecheng2002 , is this example working for you?

I attempted multiple times to use this example yesterday with no success. I was not able to see the digital pins read a high signal when trying to input a 5 volt input or a 9.5 volt input. The digital channels only displayed 0. // Ultimately, I need to wire in a DHT22 sensor as a digital input and the digital inputs were not seeing this either. // The syntax seems different between the Portenta Machine Control and typical Arduino and I am not finding a list of "Language References" similar to what exist for the UNO Arduino Reference - Arduino Reference -

Example: Does anyone have a link for references for this function: "digital_inputs.read()"? or any of the other functions in the Machine Control examples? I am drawing a blank searching for these. Without documentation and backward compatibility with older Arduino functions, the Portenta Machine Control is shooting in the dark from a programming perspective.

I have been running into a lot of the same issues when trying to use the PMC but with the PLC IDE.

For the digital inputs it is expecting the high voltage +24 Volts. Based on the datasheet, as far as I can tell there is no way to get it to register with lower voltages.

If you download the Arduino_MachineControl library there are examples in the examples folder but whether or not they were actually setup to run on the PMC is hit or miss. There is a digital inputs sketch in those folders though.

1 Like

Randy23, You would use a Nagate contact within you LD code, To get a better understanding of LD code, try https://www.plcfiddle.com/ and go through the lessons in the code school.

I was able to experimentally determine that 11.35 Volts is where the digital pins change state. Any voltage below that is reported as FALSE and any voltage above that is reported as TRUE.

The digital inputs and programmable digital I/O do not require anything to be connected to the 24 Volt In pins for inputs to show TRUE when this voltage is met.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.