importation of code matlab in LabView

39 Ansichten (letzte 30 Tage)
Khlifi Wahid
Khlifi Wahid am 13 Mai 2024
Beantwortet: Ayush Singh am 20 Jun. 2024
when I call a script code in LabView, i obtain this message "To get started, type doc. For product information, visit www.mathworks.com. "

Antworten (1)

Ayush Singh
Ayush Singh am 20 Jun. 2024
Hey Khilfi,
I see you are trying to open a MATLAB script in LabView.
The message that you received typically means that the MATLAB script execution has started but has not necessarily executed your intended script commands. This message is the standard greeting message from MATLAB when it starts up, indicating that MATLAB has been successfully called from LabVIEW but the specific instructions or the script you intended to run might not have been executed correctly.
Below are some initial troubleshooting steps you can try:
1. Check the MATLAB Script Path
  • Ensure that the path to the MATLAB script is correctly specified in LabVIEW. If LabVIEW cannot find your script due to a wrong path, it might just open MATLAB without executing the script.
2. Review the Script Execution Command
  • Verify the command you are using in LabVIEW to call the MATLAB script. You should be using a function or method that explicitly tells MATLAB to run a script, such as `eval`, `run`, or directly invoking the script name if it's in MATLAB's current path.
3. Ensure the Script Does Not Require User Input
  • If your MATLAB script requires user input (e.g., using the `input` function), it might be waiting for input and not proceeding with execution. Scripts called from external applications like LabVIEW should be automated and not require any interactive input.
4. Permissions and Environment
  • Ensure that LabVIEW has the necessary permissions to execute MATLAB scripts and that any environment variables or system paths required for MATLAB are correctly configured.
By going through these steps, you maybe able to diagnose why the MATLAB script is not executing as expected from LabVIEW and resolve the issue.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by