| Author |
Message |
tokra100
Joined: Jan 22, 2008 Posts: 11
|
Posted: May 27, 2008 12:36 PM Post subject: XMLNetServer only returning 1.0 and 0.0 |
|
Hi all,
I am relatively new to BioEra and have been attempting to take data from an input source (as of this moment I am using the simulator as my pendant eeg needs charging) and then pass the amplitude to another application. I have the system setup so that the output of the simulator goes to both the oscilloscope and the XMLNetServer. The oscilloscope shows a cleanly osscilating signal however the recieving application only ever gets
<BioEraData Ch1=\"0.0\" />
or
<BioEraData Ch1=\"1.0\" />
I cant see why this is happening. If this is a very simple problem then please forgive my ignorance but any help you can offer would be great.
Thanks in advance
Anthony Bailey |
|
 |
tokra100
Joined: Jan 22, 2008 Posts: 11
|
Posted: May 27, 2008 1:26 PM Post subject: Further Information |
|
| On further investigation I have found that it returns 1 and 0 when it is at the highest or lowest point of the wave form corresponding to true or false. But how do I go about getting the actual amplitude? |
|
 |
jarek
Joined: Oct 22, 2007 Posts: 1075
|
Posted: May 27, 2008 3:10 PM Post subject: |
|
Anthony,
which version of BioEra are you currently using?
Jarek
|
|
 |
tokra100
Joined: Jan 22, 2008 Posts: 11
|
Posted: May 27, 2008 8:22 PM Post subject: |
|
Hi Jarek,
Its the 2.0 Pro Beta that is currently available from the members section of the site.
Anthony |
|
 |
jarek
Joined: Oct 22, 2007 Posts: 1075
|
Posted: May 27, 2008 9:15 PM Post subject: |
|
So this means you have 2.0.68. The XmlNetServer element was improved in 2.0.82 which has not been officially released yet. I will try to update latest development version and post here when this is done.
Jarek
|
|
 |
tokra100
Joined: Jan 22, 2008 Posts: 11
|
Posted: Jun 1, 2008 10:16 AM Post subject: |
|
Hi Jarek,
Ok thanks for that. Is there no way of getting the actual amplitude value using the current release version as a lot of my research work currently relies upon this capability.
It seems somewhat unusal to only be recieving 1.0 and 0.0 with the ocasional random 0.something in the middle.
Has anyone else had any experience with this component that may be of use?
Thanks in advance
Anthony Bailey |
|
 |
tokra100
Joined: Jan 22, 2008 Posts: 11
|
Posted: Jun 2, 2008 8:01 AM Post subject: |
|
Hi Jarek,
I have been having a look over the documentation and would like some advice. First I shall explain what I am attempting to do.
I am using a PendantEEG device to measure a subjects EEG readings. The 4 outputs of this device are then passed through filters to isolate the delta, theta, alpha, beta and gama frequencies. I then wish to pass the output of the filter and the original electrical values to an external application for classification. I intended to do this using XmlNetServer as it appeared to offer the highest accuracy. So my design is quite simply PendantEEG->Filters->XmlNetServer. | ^ --------------------------------------
On the other end I have a small C# application to read the XML in. Does this setup sound logical?
Secondly, from what I understand, to convert the recieved xml values to the actual physical values i need to do (using an XML input of say 0.024)
s1 = 0.024 * PMax
If this is correct is there any way to get BioEra to transmit the value of PMax as I would like my classification system to adapt without having to change this value?
Any advice on this would be of great help.
Regards
Anthony Bailey
|
|
 |
jarek
Joined: Oct 22, 2007 Posts: 1075
|
Posted: Jun 2, 2008 3:08 PM Post subject: |
|
Hi Anthony,
new version 2.0.89 has been officially released, so feel free to download. The XmlNetServer has a new option (clipping), clear it and you should receive actual amplitude in uV.
Everything else you are doing looks right to me.
Jarek |
|
 |
tokra100
Joined: Jan 22, 2008 Posts: 11
|
Posted: Jun 2, 2008 5:03 PM Post subject: |
|
Hi Jarek,
Thanks a lot. :). I have one final (hopefully easy) question. I have bioera installed in my office an university however I would like to install it on my home machine in order to do work there too. Do you know how the activation server will react to a request to activate on two machines?
Also in my original design I found it imposible to use the default xml parser as it assumed there were multiple root nodes. This is fully understandable considering how XML works however I also noticed that I could not use a standard StreamReader.ReadLine (I apologies if this is there in the new design).
<cont on next post> |
|
 |
tokra100
Joined: Jan 22, 2008 Posts: 11
|
Posted: Jun 2, 2008 5:31 PM Post subject: |
|
| At the moment I just use a standard read character and just read until I find the > character, and, then pass the content between these two characters to a more extensive parsing mechanism. This is somewhat cumbersome as it adds extra read overheads. Is this the only way to detect the end of an xml line or have you provided any other mechanism? |
|
 |
jarek
Joined: Oct 22, 2007 Posts: 1075
|
Posted: Jun 2, 2008 5:54 PM Post subject: |
|
Hi Anthony,
one bioera license is for one computer only.
> At the moment I just use a standard read character and just read until I find the > character
Yes, this is the way to go. The XML format is primarily for clarity (and to make any future extensions easier). Regular XML parsers may not accept it, because they usually assume static content (like xml files), not dynamic like here. To detect '>' character should be as fast as reading entire lines, no overhead. All methods which read lines simply look for another character ' '.
Jarek
|
|
 |
jarek
Joined: Oct 22, 2007 Posts: 1075
|
Posted: Jun 2, 2008 7:28 PM Post subject: |
|
Hi Anthony,
the writeln() function would add addtional characters for each record (EOL and CR), which would be unnecessary overhead. Since the XMLNetServer is provided for software clients, it should not be a problem to detect '>' rather then end of line. It is just a matter of one or two more lines in the code.
Jarek |
|
 |
tokra100
Joined: Jan 22, 2008 Posts: 11
|
Posted: Jun 2, 2008 7:34 PM Post subject: |
|
Hi Jarek,
I thought it would be something like that.
Again thanks for the help,
Anthony |
|