Hi,
I try to send triggers to the acquisition server.
With an C++ program it works well.
But I have a C# program, who have to send the triggers.
I tried to use an C++ DLL that will start from C#, but it don't work. He don't send any Signal.
Has anyone an idea how to do that?
Thanks,
Fry
Sending trigger to acquisition server from CSharp Programm
Re: Sending trigger to acquisition server from CSharp Progra
Hi,
I am the creator of the software tagging. I have C# wrapper for all the taggings.You need to use the attached C++ Managed code wrapper dll. It is designed for P300, but you can use it with TestWriteValue for anything:
https://drive.google.com/file/d/0B2R2Bc ... sp=sharing
It also supports Serial port and USB, parallel port, etc.
We use this wrapper for P300 C# speller application.
I am the creator of the software tagging. I have C# wrapper for all the taggings.You need to use the attached C++ Managed code wrapper dll. It is designed for P300, but you can use it with TestWriteValue for anything:
Code: Select all
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace test_managed_tagger
{
class Program
{
//managed wrapper openvibe-tagging-wrapper dll is required
//unamanaged inpout32.dll is required
static void Main(string[] args)
{
OpenVibeTaggingWrapper p = new OpenVibeTaggingWrapper(OpenVibeTaggingWrapper.eProtocol.Software,"openvibeExternalStimulations");
//OpenVibeTaggingWrapper p = new OpenVibeTaggingWrapper(OpenVibeTaggingWrapper.eProtocol.EightBitParallelPort,"888");
//string comPort = Console.ReadLine();
//OpenVibeTaggingWrapper p = new OpenVibeTaggingWrapper(OpenVibeTaggingWrapper.eProtocol.SerialPort, comPort);
for (int i = 0; i < 10; i++)
{
//p.SetTargetRow(5);
Console.WriteLine(i);
System.Threading.Thread.Sleep(1000);
//p.TestWriteValue(i);
p.TestWriteValue(32779);
}
}
}
}
It also supports Serial port and USB, parallel port, etc.
We use this wrapper for P300 C# speller application.
Re: Sending trigger to acquisition server from CSharp Progra
Hi,
thanks for your answer.
I test the Csharp code with your dll, but the Acquisition client receives no Signal.
Here is a Picture of my OpenVibe Designer Scenario: In the Acquisition Server I have enabled the Plugin Settings "EnableExternalStimulations" and openvibeExternalStimulations as the "ExternalStimulationQueueName". What do I wrong? Have I to do something else?
thanks for your answer.
I test the Csharp code with your dll, but the Acquisition client receives no Signal.
Here is a Picture of my OpenVibe Designer Scenario: In the Acquisition Server I have enabled the Plugin Settings "EnableExternalStimulations" and openvibeExternalStimulations as the "ExternalStimulationQueueName". What do I wrong? Have I to do something else?
Re: Sending trigger to acquisition server from CSharp Progra
It was working last time I checked.
I will need to debug it.
I will need to debug it.
Re: Sending trigger to acquisition server from CSharp Progra
Ok, so one important thing is that you need to start your c# program before the AS.
I also tried with different version of boost library. I compiled both my C# application wrapper and the acquisition server with boost 1.54 (OV uses 1.47) and now it is working.
I also tried with different version of boost library. I compiled both my C# application wrapper and the acquisition server with boost 1.54 (OV uses 1.47) and now it is working.
Re: Sending trigger to acquisition server from CSharp Progra
https://drive.google.com/file/d/0B2R2Bc ... sp=sharing
https://drive.google.com/file/d/0B2R2Bc ... sp=sharing
So the above is an AS compiled in Debug with boost 1.54
and the wrapper compiled in Release with boost 1.54
Both were compiled with source code of OV 0.17
It might all work for you now.
https://drive.google.com/file/d/0B2R2Bc ... sp=sharing
So the above is an AS compiled in Debug with boost 1.54
and the wrapper compiled in Release with boost 1.54
Both were compiled with source code of OV 0.17
It might all work for you now.
Re: Sending trigger to acquisition server from CSharp Progra
Unfortunately it don't work.
The "openvibe-acquisition-server.exe" does not start. He don't find "GUSBAMP.DLL". What is it?
"openvibe-tagging-wrapper.dll" runs, but I get still no signal.
My current solution:
What I do now to get signals to the AQ-Server is to use the sample from here:
http://openvibe.inria.fr/vrpn-tutorial- ... -openvibe/
I modified the Button VRPN Client to get 4 diffrent signal types.
To send signals from my CSharp program I use VrpnNet (http://wwwx.cs.unc.edu/~chrisv/vrpnnet).
To test the timing i send singals in 1000ms interval to openvibe.
With a frequence of 1024 Hz in the aquistion server (generic oscillator) I get an accuracy from +-2ms.
Using the EEG driver with 500Hz the accuracy is +-4ms.
Thats good enough for now.
But I would like to test your "tagging-wrapper" also.
The "openvibe-acquisition-server.exe" does not start. He don't find "GUSBAMP.DLL". What is it?
"openvibe-tagging-wrapper.dll" runs, but I get still no signal.
My current solution:
What I do now to get signals to the AQ-Server is to use the sample from here:
http://openvibe.inria.fr/vrpn-tutorial- ... -openvibe/
I modified the Button VRPN Client to get 4 diffrent signal types.
To send signals from my CSharp program I use VrpnNet (http://wwwx.cs.unc.edu/~chrisv/vrpnnet).
To test the timing i send singals in 1000ms interval to openvibe.
With a frequence of 1024 Hz in the aquistion server (generic oscillator) I get an accuracy from +-2ms.
Using the EEG driver with 500Hz the accuracy is +-4ms.
Thats good enough for now.
But I would like to test your "tagging-wrapper" also.