Hi Hemangkumar,
The error message "Unrecognized function or variable" typically means that MATLAB cannot find the specified function in its path. In your case, it seems like MATLAB cannot find the function “opcmex”. The “opcmex” is a function from the OPC Toolbox.
Here are a few things you could try:
- Check if the OPC Toolbox is installed: You can do this by typing “ver” in the MATLAB command window. This will list all installed toolboxes. If the OPC Toolbox is not listed, you will need to install it.
- Check the MATLAB path: The function might exist, but MATLAB might not be looking in the right place. You can check the MATLAB path by typing “path” in the command window. If the directory containing “opcmex” is not in the path, you can add it using the “addpath” function.
- Reinstall the Toolbox: If the toolbox is installed but the function is still not recognized, try reinstalling the toolbox. There might have been an issue during the installation process that caused the function to be missing or corrupted.
Attached below are some documentation links that you may find helpful:
- Get Started with Industrial Communication Toolbox (mathworks.com)
- (Not recommended) Version information - MATLAB ver (mathworks.com)
- View or change search path - MATLAB path (mathworks.com)
- Add folders to search path - MATLAB addpath (mathworks.com)
Hope this helps!
Karan Singh Khati