Hi everyone,
I need your help using the matlab scripting box:
1. Is there a way to stop recording/ send to the uninitialized function without pressing stop after a certain amount of time. I want to acquire data for 30 sec for example and only then send it for further processing in a different matlab box.
2. I also would like to process data in real time and every 12-second send a result via UDP, is it possible?
3. Is there a box that allows an opening of an animation app saved on the PC.
I know I can do it all separately using different designer's procedures like one program acquiring the data and saving it, one using the matlab code for processing, opening the app separately, yet I am trying to do it in one elegant procedure, yet I don't know if it is possible.
Many Thanks,
Yael
Designing an experiment using matlab scripting box
-
- Posts: 775
- Joined: Tue Dec 04, 2012 3:53 pm
- Location: INRIA Rennes, FRANCE
Re: Designing an experiment using matlab scripting box
Hi,
if I understand the questions correctly, you may be able to do some of these things using some cleverness.
1) some combination of timeout, clock stimulator, lua stimulator and stream swich box can be rigged to change where the data flows. Player Controller can be used to stop the processing.
2) there is no UDP export in openvibe, but you may be able to do this by first sending the data to matlab/python/lua and do it there.
3) the box is called "Run Command"
Cheers,
Jussi
if I understand the questions correctly, you may be able to do some of these things using some cleverness.
1) some combination of timeout, clock stimulator, lua stimulator and stream swich box can be rigged to change where the data flows. Player Controller can be used to stop the processing.
2) there is no UDP export in openvibe, but you may be able to do this by first sending the data to matlab/python/lua and do it there.
3) the box is called "Run Command"
Cheers,
Jussi
Re: Designing an experiment using matlab scripting box
Dear Jussi,
Many thanks for your reply, I have tried several scenarios, yet nothing worked. I simply could not stop the program.
Please see attached some of my trials. I will appreciate any input.
I've tried breaking what I ultimately would like into small blocks just to see if it works.
Many thanks,
Yael
Many thanks for your reply, I have tried several scenarios, yet nothing worked. I simply could not stop the program.
Please see attached some of my trials. I will appreciate any input.
I've tried breaking what I ultimately would like into small blocks just to see if it works.
Many thanks,
Yael
- Attachments
-
- yael.xml
- (20.82 KiB) Downloaded 193 times
-
- rest_model.xml
- (22.22 KiB) Downloaded 183 times
-
- trial.xml
- (14.14 KiB) Downloaded 190 times
-
- Posts: 775
- Joined: Tue Dec 04, 2012 3:53 pm
- Location: INRIA Rennes, FRANCE
Re: Designing an experiment using matlab scripting box
The trial.xml one should work, in the others you have the conceptual error that you assume Identity boxes to generate stimulation stream, when they don't in fact generate anything but just pass the data on as-is. Basically some OV boxes make novel outputs, where some can only produce output if they get meaningful input, and so on. When connecting two boxes A and B, you always have to consider if A is configured in a way that it can produce meaningful output for B.
Also, if you want the Designer actually to exit as an application as a reaction to the Player Controller "Stop", you need to run Designer in --no-gui mode. Running designer on command line will give you these command line flags,
The --no-visualization and --invisible might have the same effect.
Cheers,
Jussi
Also, if you want the Designer actually to exit as an application as a reaction to the Player Controller "Stop", you need to run Designer in --no-gui mode. Running designer on command line will give you these command line flags,
Code: Select all
C:\Program Files (x86)\openvibe-2.1.0> openvibe-designer.cmd --help
Syntax : C:\Program Files (x86)\openvibe-2.1.0\\bin\openvibe-designer.exe [ switches ]
Possible switches :
--help : displays this help message and exits
--config filename : path to config file
--define token value : specify configuration token with a given value
--open filename : opens a scenario (see also --no-session-management)
--play filename : plays the opened scenario (see also --no-session-management)
--play-fast filename : plays fast forward the opened scenario (see also --no-session-management)
--no-gui : hides the Designer graphical user interface (assumes --no-color-depth-test)
--no-visualization : hides the visualisation widgets
--invisible : hides the designer and the visualisation widgets (assumes --no-check-color-depth and --no-session-management)
--no-check-color-depth : does not check 24/32 bits color depth
--no-session-management : neither restore last used scenarios nor saves them at exit
--random-seed uint : initialize random number generator with value, default=time(NULL)
Press any key to continue . . .
Cheers,
Jussi
Re: Designing an experiment using matlab scripting box
Hi Jussi,
Thanks again for all your help. Yet the trial.xml doesn't work as I want, after 30 sec I still see the signal display, my ultimate goal is that after 30 sec it will stop acquiring data from the device, that means that there shouldn't be any signal to display. Another issue is that there is a 7 sec delay in lunching the run command. is there a box that receives the signal and only send it out after a few sec?
Many thanks,
Yael
Thanks again for all your help. Yet the trial.xml doesn't work as I want, after 30 sec I still see the signal display, my ultimate goal is that after 30 sec it will stop acquiring data from the device, that means that there shouldn't be any signal to display. Another issue is that there is a 7 sec delay in lunching the run command. is there a box that receives the signal and only send it out after a few sec?
Many thanks,
Yael