How to solve problem in communicating with Simulink and Arduino plc through an OPC server?

2 次查看(过去 30 天)
Hello everyone, I am developing a project I want to communicate about current sensors and voltage Arduino and communicate them to Simulink in this simulink'm estimating the state of charge of a battery with solar panels, and then this data status send to a charge allen Bradley PLC via an OPC server, however communicating together all this I get the following error
The Corresponding 'opcslwrite.tlc' file for the MATLAB S-function 'opcslwrite' in block 'xx / OPC Write' must be located in the current working directory, the MATLAB S-function directory 'C: \ Program Files \ MATLAB \ R2012b \ toolbox \ opt \ opcblks \ opcblks ', or the directory' C: \ Program Files \ MATLAB \ R2012b \ toolbox \ opt \ opcblks \ opcblks \ tlc_c ''
But this file .tlc not find anywhere if someone were kind enough to give me some help I would appreciate it too.

回答(1 个)

Madhu Govindarajan
Madhu Govindarajan 2015-11-18
S-functions need to come with tlc for code generation and given that you cannot see the file in MATLAB path makes me believe this block was not created for Code generation. You will have to write a custom tlc file for this.
  2 个评论
Zakarya Motea
Zakarya Motea 2018-1-31
actually. this happen sometimes only. means tlc is located and all the built files are normal. but sometimes this error occur .
Madhu Govindarajan
Sorry I am not too familiar with OPC toolbox. Could you post this as a new question with the appropriate error message? This way it will be easier for others to assist you.

请先登录,再进行评论。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by