tapacat
Hello, I've already tried to look for this answer in this forum but I came up empty handed. I need to take the bool state of 9 digital pins and send them through the serial port but I can't figure out how to do so. I've already tried creating new global variables that will hold the bool state of the pins but it wouldn't work.
Reply 0 0
thiagoralves
You need to use an Arduino Extension to do that. Create 9 variables on the arduino extension, and then the same 9 variables on your PLC program (type "external"). Store the state of your 9 pins on those 9 variables, and then from the Arduino Extension side, just print them using Serial.print().
Reply 0 0
fg71
Other approach would be to use Arduino extension to have the same pins numbers in a array and use for loop to serial print index of digitalRead().
Reply 0 0
Reply