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

1 view (last 30 days)
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.

Answers (1)

Madhu Govindarajan
Madhu Govindarajan on 18 Nov 2015
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 Comments
Zakarya Motea
Zakarya Motea on 31 Jan 2018
actually. this happen sometimes only. means tlc is located and all the built files are normal. but sometimes this error occur .
Madhu Govindarajan
Madhu Govindarajan on 2 Feb 2018
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.

Sign in to comment.

Categories

Find more on Simulink Supported Hardware in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!