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 Oct 22, 2019 12:08 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Wed Oct 09, 2019 9:17 am 
Offline

Joined: Wed Aug 05, 2015 1:26 pm
Posts: 23
I have set up Modbus TCP Client in Codesys 3.5.12 to read/write to are remote IO and I want to be able to change the IP of a Modbus TCP server (slave) in Codesys if the IP of the remote IO changes.
The change of the slave IP should be made through a HMI or WebVisu.

Modbus TCP slave has a method called UpdateCommunicationSettings with IP and Port as parameters.
It says that "Fails (return value !=0) if TCP connection is currently established. (-->Use Enable Property to connect/abort)".

Where do I find this Enable property?


Top
   
PostPosted: Wed Oct 09, 2019 9:01 pm 
Offline

Joined: Tue Mar 26, 2019 4:28 pm
Posts: 26
You can find it in the online help
https://help.codesys.com/webapp/_mod_li ... ion_editor

Modbus TCP slave instance name .xEnable


Top
   
PostPosted: Thu Oct 10, 2019 6:12 pm 
Offline

Joined: Wed Aug 05, 2015 1:26 pm
Posts: 23
The problem is tha I can't see xEnable property in the inputs and outputs list of the FB at all.
My Modbus TCP Slave name is IO_Board and I get an error when I type IO_Board.xEnable.

------ Build started: Application: Device.Application -------
typify code ...
[ERROR] FB_CoolingUnit: FAULTS_CHECKING [Device: PLC Logic: Application](Line 15, Column 1 (Impl)): C0018: 'IO_Board.xEnable' is no valid assignment target
[ERROR] FB_CoolingUnit: FAULTS_CHECKING [Device: PLC Logic: Application](Line 15, Column 1 (Impl)): C0004: 'xEnable' is no component of 'MODBUSTCPSLAVE'
Compile complete -- 2 errors, 0 warnings


Top
   
PostPosted: Thu Oct 10, 2019 7:24 pm 
Offline

Joined: Wed Aug 05, 2015 1:26 pm
Posts: 23
So in order for the Enable property to be shown, the option "EnableDiagnosis for devices" in PLC Settings has to be activated.


Top
   
PostPosted: Thu Oct 10, 2019 7:46 pm 
Offline

Joined: Tue Mar 26, 2019 4:28 pm
Posts: 26
Great! So is it all working now?


Top
   
PostPosted: Fri Oct 11, 2019 10:54 am 
Offline

Joined: Wed Aug 05, 2015 1:26 pm
Posts: 23
I-Campbell wrote:
Great! So is it all working now?


Yes.
Thanks for the tips.


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: manuelpineda 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