Interrupt using the Portenta Machine Control

"Hey! I've just purchased the Arduino Portenta Machine Control and have three basic questions. I'm very new to Arduino PLC and PLC frameworks. My initial question is about adding an interrupt for an encoder. I've mapped digital input 1 to a variable, and then I used attachInterrupt(variable, function, CHANGE), but that did not work.

My second question is about the pinout for the Portenta. I can't find any information about which pin I should assign to digital out 1, for example. In other words, how do I use this: pinMode(pin?, ...);?

Lastly, I wonder how I access the encoder pins on my Portenta. I can't seem to find them in my local keys in the resources map in the Arduino PLC.

I'm grateful for any help! Thank you!"