BCI2000 and e-Prime
BCI2000 and e-Prime
Hi,
Here I have an e-Prime application which is now connected to NetStation and sends to it trial,direction of movement and frequency,I can see these data in my external application which is written in Java.Now I want to send these data to BCI2000 but I don't know how I should use it in BCI2000.
Do I need this external application which is in Java and here I suppose it as an intermediate program between e-Prime and BCI2000?
Shall I use BCI2000Remote Interface? If yes,would you please say how?
Best Regards
Mabi
Here I have an e-Prime application which is now connected to NetStation and sends to it trial,direction of movement and frequency,I can see these data in my external application which is written in Java.Now I want to send these data to BCI2000 but I don't know how I should use it in BCI2000.
Do I need this external application which is in Java and here I suppose it as an intermediate program between e-Prime and BCI2000?
Shall I use BCI2000Remote Interface? If yes,would you please say how?
Best Regards
Mabi
Re: BCI2000 and e-Prime
Hi,
in order to make a suggestion, I will need to understand what you are trying to do, which is difficult from the information you provide.
AFAIK, NetStation is a data acquisition software provided by EGI. So e-Prime sends some information to NetStation, I guess this is because you want it to be recorded in the data file, right? In addition to that, you have a Java program that is able to receive that data, and display it. How does the Java application receive that data, and from where? From e-Prime, or from NetStation?
Now when BCI2000 comes in, does it replace NetStation? Do you intend to send data from e-Prime to BCI2000 for the purpose of recording, or in order to control BCI2000? Would you like to use e-Prime for stimulus presentation, and BCI2000 for recording, and online processing? Would e-Prime need to receive processing results from BCI2000?
Regards,
Juergen
in order to make a suggestion, I will need to understand what you are trying to do, which is difficult from the information you provide.
AFAIK, NetStation is a data acquisition software provided by EGI. So e-Prime sends some information to NetStation, I guess this is because you want it to be recorded in the data file, right? In addition to that, you have a Java program that is able to receive that data, and display it. How does the Java application receive that data, and from where? From e-Prime, or from NetStation?
Now when BCI2000 comes in, does it replace NetStation? Do you intend to send data from e-Prime to BCI2000 for the purpose of recording, or in order to control BCI2000? Would you like to use e-Prime for stimulus presentation, and BCI2000 for recording, and online processing? Would e-Prime need to receive processing results from BCI2000?
Regards,
Juergen
Re: BCI2000 and e-Prime
Hi,
thank you for your reply.
Best Regards
Mabi
thank you for your reply.
for now I want to use BCI2000 and not any more NetStation.AFAIK, NetStation is a data acquisition software provided by EGI. So e-Prime sends some information to NetStation, I guess this is because you want it to be recorded in the data file, right?
In my Java application I received some data (like timing,frequency and motion type according to my e-Prime application) from e-Prime and now I sent these data to BCI2000,but I don't know how to use these data in BCI2000.In addition to that, you have a Java program that is able to receive that data, and display it. How does the Java application receive that data, and from where? From e-Prime, or from NetStation?
As you mentioned I want to use e-Prime to provide stimulus and BCI2000 for recording and online processing and e-Prime will need to receive processing results from BCI2000.Now when BCI2000 comes in, does it replace NetStation? Do you intend to send data from e-Prime to BCI2000 for the purpose of recording, or in order to control BCI2000? Would you like to use e-Prime for stimulus presentation, and BCI2000 for recording, and online processing? Would e-Prime need to receive processing results from BCI2000?
Best Regards
Mabi
Re: BCI2000 and e-Prime
Why don't you use BCI2000's StimulusPresentation module instead of ePrime?
Gerv
Gerv
Re: BCI2000 and e-Prime
Hi,
I need to send some information which comes from different programs in e-Prime.
Regards,
Mabi
I need to send some information which comes from different programs in e-Prime.
Regards,
Mabi
Re: BCI2000 and e-Prime
Hi,
so it seems you don't need the Java application any more. Instead, you may open a TCP connection to the BCI2000 operator module's Telnet server, and send Operator Scripting commands through that connection. Use ADD EVENT and SET EVENT in order to record your external information into BCI2000 data files.
To read BCI2000's processing results, you may either poll the signal using GET SIGNAL(1,1), or use WATCH SIGNAL(1,1) to send signal changes to a UDP port, and read it from there from ePrime. The second method is more reliable but also more difficult to implement -- the first method is simpler, but you may lose some signal values if polling is too slow.
If ePrime allows you to call functions from DLL, then you might consider using BCIRemoteLib, which is a wrapper around such a TCP connection, so you don't need to deal with the connection itself.
HTH,
Juergen
so it seems you don't need the Java application any more. Instead, you may open a TCP connection to the BCI2000 operator module's Telnet server, and send Operator Scripting commands through that connection. Use ADD EVENT and SET EVENT in order to record your external information into BCI2000 data files.
To read BCI2000's processing results, you may either poll the signal using GET SIGNAL(1,1), or use WATCH SIGNAL(1,1) to send signal changes to a UDP port, and read it from there from ePrime. The second method is more reliable but also more difficult to implement -- the first method is simpler, but you may lose some signal values if polling is too slow.
If ePrime allows you to call functions from DLL, then you might consider using BCIRemoteLib, which is a wrapper around such a TCP connection, so you don't need to deal with the connection itself.
HTH,
Juergen
Re: BCI2000 and e-Prime
Hi,
thank you for your reply,
I opened a TCP connection to the BCI2000 operator module's Telnet Server,now I want to specify scripts command through this connection.I new that BCI2000Remote class has two methods "SetScript" and "GetScript". Shall I use these methods and if Yes,how? or just type commands in preferences dialog box in operator module?
for now I typed command
-ADD EVENT Artifact 1 0
in On Suspend textbox
and also
SET EVENT Artifact 1
SET EVENT Artifact 0
separately in function button part
and after running and click on Suspend button I faced this error:
Script error: Could not add event Artifact to list outside idle state
and according to what I read http_nospam_www.bci2000.org/wiki/index. ... _on_States
event is used in idle state while I want to mark each block of brain data with external information as soon as I received it.Shall I use events or just states?
Best Regards,
Mabi
thank you for your reply,
I opened a TCP connection to the BCI2000 operator module's Telnet Server,now I want to specify scripts command through this connection.I new that BCI2000Remote class has two methods "SetScript" and "GetScript". Shall I use these methods and if Yes,how? or just type commands in preferences dialog box in operator module?
for now I typed command
-ADD EVENT Artifact 1 0
in On Suspend textbox
and also
SET EVENT Artifact 1
SET EVENT Artifact 0
separately in function button part
and after running and click on Suspend button I faced this error:
Script error: Could not add event Artifact to list outside idle state
and according to what I read http_nospam_www.bci2000.org/wiki/index. ... _on_States
event is used in idle state while I want to mark each block of brain data with external information as soon as I received it.Shall I use events or just states?
Best Regards,
Mabi
Re: BCI2000 and e-Prime
How can you use methods of the BCI2000Remote class? Are you programming in C++, or in Java?I new that BCI2000Remote class has two methods "SetScript" and "GetScript". Shall I use these methods and if Yes,how?
Re: BCI2000 and e-Prime
Hi
I wrote a piece of code in C++ according to what I read http_nospam_www.bci2000.org/wiki/index. ... 2B_Example and could run BCI2000 from my code and also this piece of code receives the needed information from e-Prime,Now as you have said:
and in both ways I faced this error:
Best Wishes
Mabi
I wrote a piece of code in C++ according to what I read http_nospam_www.bci2000.org/wiki/index. ... 2B_Example and could run BCI2000 from my code and also this piece of code receives the needed information from e-Prime,Now as you have said:
I want to ADD EVENT and SET EVENT,I did it in OnConnect handler and OnSuspend handler, in two ways,both in my code and using SetScript() function and also in preferences windowUse ADD EVENT and SET EVENT in order to record your external information into BCI2000 data files.
and in both ways I faced this error:
would you please give me more guide line?Could not add event Freq to list outside idle state
Best Wishes
Mabi
Re: BCI2000 and e-Prime
Hi,
the SetScript() and GetScript() methods correspond to the SET SCRIPT and GET SCRIPT scripting commands. I don't think you would want to use those.
There are no wrapper functions for ADD EVENT and SET EVENT. Instead, use the generic Execute() method, which allows you to execute arbitrary commands:
b.Execute( "ADD EVENT blubb 32 0 0 0" );
Note that you need to add events before modules are connected, this is why you cannot call this command from an OnConnect handler.
Regards,
Juergen
the SetScript() and GetScript() methods correspond to the SET SCRIPT and GET SCRIPT scripting commands. I don't think you would want to use those.
There are no wrapper functions for ADD EVENT and SET EVENT. Instead, use the generic Execute() method, which allows you to execute arbitrary commands:
b.Execute( "ADD EVENT blubb 32 0 0 0" );
Note that you need to add events before modules are connected, this is why you cannot call this command from an OnConnect handler.
Regards,
Juergen
Who is online
Users browsing this forum: No registered users and 18 guests