Error: Could not open Output file

Questions about using the MCL scripting language.
jrheard
Posts: 2
Joined: Fri Apr 27, 2018 12:15 pm

Error: Could not open Output file

Postby jrheard » Fri Apr 27, 2018 12:22 pm

Hi! I'm trying to run some MCL on an MCP for my first time, and I'm encountering an error that I can't figure out how to resolve.

Ion Studio reports that I'm connected to a MCP 2x60A (COM7) (128). My coworker has used Ion Studio to tune the connected motors/encoders, so I'm convinced that the MCP is in good working order and has been set up correctly. Ion Studio reports that the device has firmware version 1.0.8.

My coworker and I have been in contact with Ion support via email regarding a topic similar to this forum post: http://forums.ionmc.com/viewtopic.php?f=7&t=593. We were given this starter program to try out and modify to our liking:

Code: Select all

start
    pause 2000
    power 0,8192,163840   
main
    if(SIGNALPOSITION(0)>0)then
        power 0,8192,163840
    endif
    if(SIGNALPOSITION(1)>0)then
        power 0,-8192,163840
    endif
   
    goto main


I opened Ion Studio, connected to the MCP, opened the MCL Editor window, and pasted that code into the editor. I saved the file on my desktop as limitswitches.mcl. I then pressed the "Check Script" button, at which point the output pane on the bottom of the program gives me this output:

Code: Select all

Preparing files...
Error: Could not open Output file


I don't know what "Output file" means in this context, and haven't been able to find solutions in the manual or via Google searches. The error happens even when I try to check a completely empty .mcl file. What am I doing wrong?

Thanks!

User avatar
Basicmicro Support
Posts: 965
Joined: Thu Feb 26, 2015 9:45 pm

Re: Error: Could not open Output file

Postby Basicmicro Support » Mon Apr 30, 2018 9:28 am

I had a call about this(I it may have been a different user). It turned out his user name had a space in the folder name which caused the filename(he saved the file to his desktop) to be read incorrectly. Move the mcl file to a folder that doesnt have spaces in the filename. If that doesnt fix the problem please contact support@ionmc.com

We will be updating the mcl compiler so it handles file names with spaces correctly.

jrheard
Posts: 2
Joined: Fri Apr 27, 2018 12:15 pm

Re: Error: Could not open Output file

Postby jrheard » Tue May 01, 2018 1:31 pm

Yup, that was me on the phone, thanks for your help!

I moved the file to a directory without spaces in it (C:\mcl_files or some such), but the issue persisted - I ended up seeing a different error message, but the idea was the same - it fell over because there was a space in my Windows username. I think it probably had something to do with the fact that %APPDATA% had a space in it, and Ion Studio was trying to load some sort of other necessary file whose location I didn't have control over.

I ended up having to make a new Windows user in order to work around the issue, because it doesn't seem to be possible to rename a preexisting user's directory name, just their display name or something.

Anyway, long story short: having a Windows username like "ewind user" made this issue happen, and making a new Windows account with a username like "ewind" resolved the issue. Thanks!

User avatar
Basicmicro Support
Posts: 965
Joined: Thu Feb 26, 2015 9:45 pm

Re: Error: Could not open Output file

Postby Basicmicro Support » Wed May 02, 2018 9:14 am

Thanks for the update. I'll add this to our Todo.


Return to “MCL Scripting”

Who is online

Users browsing this forum: No registered users and 1 guest

cron