MWorks suggestions

Simon Bohn's Avatar

Simon Bohn

20 Jun, 2018 05:47 PM

Hi Chris, hope you are well. I just wanted to write to send along a few feature requests/suggestions. I was recently troubleshooting a new experiment and couldn't figure out why the error "parser error : Start tag expected, '<' not found" kept on coming up no matter what I wrote, even basic hello world scripts. I thought I might have had a corrupted installation. I finally figured out I had a typo in the file extension which makes sense why that would be a parser error. But a dedicated error message for this situation I think would be nice as I'm sure other people will encounter this in the future.

On another subject, I am starting to write some scripts with the blackrock LED driver setup and for the script to run, mworks requires the driver to be plugged in and on. This makes it difficult to develop on other computers than the lab computers. For things like the eyelink we have an alternate input device of the mouse. I know the LED array has an alternate output device as an optional parameter, but I'm confused about how I'd use it with the particular intricacies of the LED driver. What kind of device, if any, would you recommend using as an alternate out?

Thanks,

Simon

  1. Support Staff 1 Posted by Christopher Sta... on 20 Jun, 2018 06:24 PM

    Christopher Stawarz's Avatar

    Hi Simon,

    I finally figured out I had a typo in the file extension which makes sense why that would be a parser error. But a dedicated error message for this situation I think would be nice as I'm sure other people will encounter this in the future.

    I see your point, but MWorks doesn't require a particular file extension for anything except MWEL files. Let me think about whether there's some other way to be more helpful in this situation.

    I know the LED array has an alternate output device as an optional parameter, but I'm confused about how I'd use it with the particular intricacies of the LED driver. What kind of device, if any, would you recommend using as an alternate out?

    The "alt" parameter isn't going to help you much, because all the LED-driver-related actions require an actual LED driver instance.

    I'm planning to add support for conditional code inclusion to MWEL, so that you can write things like

    %if have_led_driver
        blackrock_led_driver_prepare (...)
    %end
    

    where have_led_driver is an expression macro that evaluates to true or false. If false, the contained statements are included; otherwise, they're omitted. You could include the LED driver declaration and all related actions within such conditional blocks, and then enable/disable them all simply by changing the value of have_led_driver.

    I think this would be a good approach in this situation. Unfortunately, I haven't added support for it yet. An alternative would be to just comment out all the LED driver stuff when testing, but that's a lot less convenient.

    Chris

  2. Christopher Stawarz closed this discussion on 24 Jul, 2018 01:25 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

17 May, 2022 02:12 PM
16 May, 2022 03:12 PM
04 May, 2022 06:02 PM
03 May, 2022 01:30 PM
02 May, 2022 10:47 PM