03-16-2010 10:48 PM
Hello
I need to know how to extract a (500ms) time window from an ongoing signal transfered by serial RS232 to labview. Extracting this time window should occure after 300ms of an action belongs to one frame of a stacked sequence.
Is it a must for doing this to work in the real time environment ?
if you know how to do this just tell me ,please .
thanks for beaing concerned.
03-17-2010 12:57 AM
03-17-2010 08:38 AM
The point is how exact do you need the timing?
Dealing with OS async signals like the serial port (with internal buffers and interups) is not very precise for timing. I have about 5 ms to 16ms jitter in mind .... however this was about 10years ago and we switched to dedicated hardware then. (a µC that read @ 9600 and send the data with timestamp over USB) Search for CAN bus analysers, this hardware is build for such proposes, maybe NI have it and it will run without RT.
Give it a try: write a routine that read single (or n) characters from the port and feed them with a timestamp into a queue. make this routine high priority and turn of debugging ( vi properties), in the OS disable or minimize the serial input chip buffer (the build in 16,32,64,... byte) so interupts where faster generated.
Now analyse your known test data in a consumer loop.
And please stop shouting 😛
03-19-2010 04:45 PM
sorry, I did not mean to shout . I just wanted the the font to be easier to be read.
I am acquiring EEG signal using serial port. I have an array of boleen LEDs in which every LED has a letter written on it . These LEDs light up in a certain sequence . The user should concentrate on one letter written on one LED to write it with his thoughts . lighting the intended letter is a visual stimuli that generates an unordinary signal called p3 . This signal appears after 300 ms of the occurence of the stimuli .So, I need to extract the segment between 150 and 600 ms after every LED lights up .Then I will use these segments to train a machine learning technique called "support vector machine " to distiguish the p3 from the ordinarry signals . and then perform some way to identify the intended LED ,and so the corresponding letter.
I hope that I could clear what I wanted this time.
Any ideas ? Thank you .
03-19-2010 05:17 PM
03-22-2010 01:36 AM
03-22-2010 03:25 AM
The challenge I see is the correct timing and syncing:
I assume you have a EEG hardware with a fixed samplerate and it's data is send via RS232 to the PC running LV. This is done with timer/clock X.
LEDs etc are controlled via LV with timer/clock Y.
Both clocks run slightly different, so after 30min you might be of for some ms... .
You don't have a spare EEG channel for a sync signal? Maybe just adding a LED abused as a lightsensor (smal currentsource) on top of one channel to add a sync spike ?