Forum Controllers/PLC

Welcome!

This community is for professionals and enthusiasts of our products and services. Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

0

How to declare input/output pins

Avatar
Terad Alturkistani

Hi, I have a simple question. 


I have the M-duino 21+ Ethernet PLC. I want to use one of it's input as a voltage sensor. My question is, how do the pins written on the PLC corrospond to the pins I declare in my code. 


The pins on one side of the PLC are labels 0.1, 0.2, 0.3, ... etc. Do I declare these pins by using pinMode(1, INPUT) ...or pinMode(0.1, Input). 


Thanks

Avatar
Discard
1 Answer
0
Avatar
Roman
Best Answer

I0_0, I0_1,... I0_9 for inputs

Q0_0, Q0_1, ... Q0_9 for digital outputs and A0_0 - A0_6 for analog outputs

All declarations you can see in AppData\Local\Arduino15\packages\industrialshields\hardware\avr\[version]\variants\[your_PLC_model]\pins_is.h

Avatar
Discard