CODESYS - the IEC 61131-3 automation software
https://forum.codesys.com/

How to use matlab to send parameters to codesys
https://forum.codesys.com/viewtopic.php?f=17&t=9093
Page 1 of 1

Author:  ligz17 [ Thu Aug 30, 2018 8:13 am ]
Post subject:  How to use matlab to send parameters to codesys

Hello!
Does anyone know how to realize the communication of Codesys and matlab?
I installed codesysV3.5 and matlabR2017 on the same computer.In codesysV3.5, there was a project to control the robot, and the movement of the robot could be controlled by changing the parameters. I want to use matlab to process the data returned by the sensor on the robot, and calculate the new parameters, and then send them to codesys for real-time control. But I don't know how to implement communication between matlab and codesys. Does anyone know it? Or is my idea feasible?

Author:  Edwin Schwellinger [ Sun Sep 09, 2018 12:54 pm ]
Post subject:  Re: How to use matlab to send parameters to codesys

Hi,
does matlab have an embedded OPCUA client?
This would be a good solution to do this. OPCUA Server is embedded in all CODESYS SL runtimes.
BR
Edwin

Author:  ligz17 [ Tue Sep 11, 2018 8:38 am ]
Post subject:  Re: How to use matlab to send parameters to codesys

Edwin Schwellinger wrote:
Hi,
does matlab have an embedded OPCUA client?
This would be a good solution to do this. OPCUA Server is embedded in all CODESYS SL runtimes.
BR
Edwin


Thank you for your suggestion. I had created a OPC Server on CODESYS and set up a OPC client with matlab which connected the server successfully.

Author:  jorgev [ Fri Sep 21, 2018 1:21 pm ]
Post subject:  Re: How to use matlab to send parameters to codesys

ligz17 wrote:
Edwin Schwellinger wrote:
Hi,
does matlab have an embedded OPCUA client?
This would be a good solution to do this. OPCUA Server is embedded in all CODESYS SL runtimes.
BR
Edwin


Thank you for your suggestion. I had created a OPC Server on CODESYS and set up a OPC client with matlab which connected the server successfully.


Hi ligz17,

I am trying to implement the same communication: CODESYS OPCUA server with raspberry pi to Matlab OPCUA client.

Unfortunately I did not succeed. Could you post more details of your solution?

I connect with other clients such as python or UAexpert. But not with Matlab or Simulink

Author:  jorgev [ Wed Oct 10, 2018 1:13 pm ]
Post subject:  Re: How to use matlab to send parameters to codesys

jorgev wrote:
ligz17 wrote:
Edwin Schwellinger wrote:
Hi,
does matlab have an embedded OPCUA client?
This would be a good solution to do this. OPCUA Server is embedded in all CODESYS SL runtimes.
BR
Edwin


Thank you for your suggestion. I had created a OPC Server on CODESYS and set up a OPC client with matlab which connected the server successfully.


Hi ligz17,

I am trying to implement the same communication: CODESYS OPCUA server with raspberry pi to Matlab OPCUA client.

Unfortunately I did not succeed. Could you post more details of your solution?

I connect with other clients such as python or UAexpert. But not with Matlab or Simulink



I successfully connected with the OPC UA SERVER at the raspberry with the entries below.

MATLAB CODE:
uaObj = opcua('opc.tcp://192.168.100.11:4840/OPCUAServer', 'None', 'None', uint8(0));
connect(uaObj)

Mathworks has suggested to use this undocumented technique until they release a patch/fix to handle better this connection errors.

Page 1 of 1 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/