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 Fri Oct 18, 2019 12:06 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Fri Sep 27, 2013 1:44 pm 
Offline

Joined: Tue Oct 04, 2011 10:13 am
Posts: 80
Hi all,
Recently I used the Modbus master library (CoDeSys V3.5.3.0).
And I noticed that dis-connecting and re-connecting the serial cable does NOT restart the Modbus protocol.
Do you have any experience with (re-) starting the Modbus protocol?
Is there a way to:
- detect that the Modbus protocol is not running.
- (re-) start the Modbus protocol manually (by the application).
Any help is appreciated.
Regards,
Edwin.


Top
   
PostPosted: Fri Sep 27, 2013 2:12 pm 
Offline
Frequent User
Frequent User
User avatar

Joined: Tue Jun 06, 2006 9:03 am
Posts: 410
Yes, this is known.

In the device tree you can set the name of your slaves (right click => properties).
This name is the instance of your Modbus Slave.

To detect the error and reset the communication you can use e.g. (mbSlave1 is the name of my Modbus slave device):
IF mbSlave1.xError THEN
mbSlave1.xReset := TRUE;
ELSE
mbSlave1.xReset := FALSE;
END_IF

*************
To get the error message you can use
VAR
bySlave1Error: IODRVMODBUS.MB_ErrorCodes;
END_VAR

bySlave1Error := mbSlave1.byModbusError;


Top
   
PostPosted: Fri Sep 27, 2013 4:49 pm 
Offline

Joined: Tue Oct 04, 2011 10:13 am
Posts: 80
Tim,
Thank you for your quick answer.
I'll apply it immediately.
Do you know where I can find a list of known issues?
(I do not have access to the CoDeSys jira database.)
Regards,
Edwin.


Top
   
PostPosted: Sat Sep 28, 2013 5:45 pm 
Offline
Frequent User
Frequent User
User avatar

Joined: Tue Jun 06, 2006 9:03 am
Posts: 410
Please contact your supplier for this.
Jira is only accessable for direct customers (OEMs) of 3S-Smart Software Solutions and Distributors.


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

All times are UTC+01:00


Who is online

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