CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Sun Jun 25, 2017 11:29 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Fri Feb 17, 2017 6:29 pm 
Offline

Joined: Fri Feb 17, 2017 6:08 pm
Posts: 2
Hi there,

I'm currently working on having my raspberry pi as a master and my arduino as the slave. Currently I'm getting a "not running" on the slave when I login. I'm not sure if I have my channels set correctly for my arduino. Can anyone point me in the right direction for what channels are need on the arduino slave? Thank you.


Top
   
PostPosted: Mon Feb 20, 2017 7:23 pm 
Offline

Joined: Thu Jun 09, 2016 10:47 pm
Posts: 17
Are you using MODBUS RTU? What serial bus? What serial cable, usb?


Top
   
PostPosted: Mon Feb 20, 2017 9:33 pm 
Offline

Joined: Fri Feb 17, 2017 6:08 pm
Posts: 2
I'm currently using usb from the raspberry pi to the serial port on the arduino.


Top
   
PostPosted: Fri Feb 24, 2017 7:14 pm 
Offline

Joined: Thu Jun 09, 2016 10:47 pm
Posts: 17
Mstanley wrote:
I'm currently using usb from the raspberry pi to the serial port on the arduino.


Then you need to edit /etc/CODESYSControl.cfg and add the following:

[SysCom]
Linux.Devicefile=/dev/ttyUSB
portnum := COM.SysCom.SYS_COMPORT1;

I used the modbusino library to set up my arduino as slave, works a treat.


Top
   
PostPosted: Wed Apr 19, 2017 8:30 pm 
Offline

Joined: Thu Feb 23, 2017 5:07 pm
Posts: 36
Sorry but to check arduino from serial you want some paid library or not?

But then can you handle inputs and outputs from codesys via PI?

Can you explain how to run from scratch to control from arduino serial?

Thank you, Alberto


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited