News:

SMF - Just Installed!

Main Menu

Arduino to EasyPLC

Started by KCP_Robin, September 03, 2015, 04:53:11 AM

Previous topic - Next topic

KCP_Robin

hello!

I'm trying to Connect my Arduino Uno to EasyPLC using the ArduinoUno driver
After configuring the I/O's.. I test it and it seems to be good.. But when I force I/O's I cant get any result. What's seems to be the problem?
Attached are the configurations I used :).... Or any sample Arduino Code and EasyPLC configuration that works might help.. Thanks in advance!



[attachment deleted by admin]

KCP_Robin

please ignore this... maybe codes on Arduino... Needs in firmata .. sorry! Ill try again
:p

KCP_Robin

Quote from: KCP_Robin on September 03, 2015, 07:39:20 AM
please ignore this... maybe codes on Arduino... Needs in firmata .. sorry! Ill try again
:p

sample code please.. to check I/O/s :)

EasyPLC_Master

Please see:

http://www.nirtec.com/index.php/easyplc-sofware-development-kit

Where is explained:

You can use an Arduino UNO card and manage it with EasyPLC. Arduino UNO provides 12 configurable digital I/O (6 of then can be programmed as analogic output) and 6 analogic inputs.
With Arduino UNO driver for EasyPLC you can configure each pin as I/O (digital or analogic) and can read/write the signals in the EasyPLC logic programs.
Important: the Firmata (StandardFirmata sketch) must to be loaded on Arduino UNO in order to use his driver (included in Arduino UNO IDE or download from: http://www.firmata.org or download here: StandardFirmata.zip)


To test the device and check the I/O, is as easy as made a scrip code like this:
(first declare 6 digital inputs and 6 digital outputs in the EasyPLC arduino configuration driver)

for(int f=0;f<6;f++)
{
   WriteOutput(0, f, ReadInput(0, f));
}

then when you active input 0, the output 0 will be on,... , until 5-5.

KCP_Robin


RBeersJr

I no experience with EasyPLC or Arduino or any type of programing but I am trying to learn. My question is once the sketch is loaded to the Arduino and EasyPLC connection is established, will the Arduino accept LAD from EasyPLC or is it only accepting SCRIPT?
Thank you for any help

EasyPLC_Master

NO, not work as you think. :P
The sketch must be loaded in the Arduino card in order to be able to communicate with EasyPLC using the PC USB port.
The Arduino card always works connected to the PC. EasyPLC reads the inputs from the Arduino card, and writes in the outputs the values, according to the logic program created with EasyPLC. :)