CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Tue Nov 20, 2018 5:09 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Thu Nov 30, 2017 10:17 pm 
Offline

Joined: Wed Aug 02, 2017 5:17 pm
Posts: 13
Hi,
I have a DAB evoplus small pump with multifunction module (for modbus protocol):

Image

I used a LAN cable cat 6a from pump (A,B and ground connector) to USB-RS485 converter, connected to raspberry Pi 3:

Image

I want to read/write registers modbus for controlling pump.
In codesys software, I see a error: a red/yellow pulse triangle (in slave_modbus_porta_COM):

Image

and the code don't work. Why ?
Do you have any solution?


Top
   
PostPosted: Fri Dec 01, 2017 7:01 am 
Offline

Joined: Fri Feb 07, 2014 7:21 am
Posts: 84
Hi,
did you modify this USB converter to the plc configuration file?
sudo nano /etc/CODESYSControl_User.cfg

[SysCom]
Linux.Devicefile=/dev/ttyUSB

cheers
plcmax


Top
   
PostPosted: Fri Dec 01, 2017 7:56 am 
Offline

Joined: Wed Aug 02, 2017 5:17 pm
Posts: 13
yes.
this is my Codesys configuration file:

Code:
[SysFile]
FilePath.1=/etc/, 3S.dat
PlcLogicPrefix=1

[CmpSettings]
FileReference.0=SysFileMap.cfg, SysFileMap
FileReference.1=/etc/CODESYSControl_User.cfg

[_]
Linux.DisableFpuOverflowException=1
Linux.DisableFpuUnderflowException=1
Linux.DisableFpuInvalidOperationException=1

[CmpBACnet]
IniFile=bacstacd.ini

[CmpWebServer]
ConnectionType=0


[CmpOpenSSL]
WebServer.Cert=server.cer
WebServer.PrivateKey=server.key
WebServer.CipherList=HIGH

[SysMem]
Linux.Memlock=0

[CmpCodeMeter]
InitLicenseFile.0=3SLicense.wbb

[SysEthernet]
Linux.ProtocolFilter=3

[CmpSchedule]
ProcessorLoad.Enable=1
ProcessorLoad.Maximum=95
ProcessorLoad.Interval=5000

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


Top
   
PostPosted: Fri Dec 01, 2017 8:21 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2960
Hi,
I would recommend to move

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

to the /etc/CODESYSControl_User.cfg if this is 3.5SP11 version.
(because there is already a section for this)
If done, which channels/function codes to read did you add to your modbus slave?


BR
Edwin


Top
   
PostPosted: Fri Dec 01, 2017 9:22 am 
Offline

Joined: Wed Aug 02, 2017 5:17 pm
Posts: 13
ok. I moved:

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


from /etc/CODESYSControl.cfg to /etc/CODESYSControl_User.cfg

This is screenshoot for function:

Image

and this is error in ModbusGeneric SerialSlave (pulse from "bus failure" to "not running"):

Image

You can download Modbus register for DAB Evoplus small pump's from here


Top
   
PostPosted: Wed Dec 20, 2017 11:44 am 
Offline

Joined: Wed Aug 02, 2017 5:17 pm
Posts: 13
ok. Solved !
The Rs485-usb converter was broken.
With new converter is all ok !


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 19 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