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

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)

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

actually. this happen sometimes only. means tlc is located and all the built files are normal. but sometimes this error occur .
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

Asked:

on 17 Nov 2015

Community Treasure Hunt

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

Start Hunting!