Channel and Wave form data..

More
13 years 3 months ago #544 by gillottir
I'm working on a python interface or rather a way of collecting data and then later plot it, I can send commands and such via serial connection and recieve the data.. but having issues trying to make any sense out of the data. outside of it being 256 bytes I've been unable to decode it.. I've been playing with the struct module, but without knowing the format of the data coming out I can't properly decode it. Although I'm not sure what to expect if I do get the data decoded, are they points to coordinates? I wish it was specified.. /\r\n//\r\n/I was hoping for some information and help, because the xprotolab could be an awesome datalog tool if I could tap into the data..

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #545 by ganzziani
Hi. You will get a good understanding of the format by looking at the source code. Particularly look at the file interface.c. If you are using an old version of firmware, the interface might be a little different.

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago - 13 years 2 months ago #546 by gillottir
Thanks for pointing that code out!, I now have some genuine data coming out. quickly added some code using the matplotlib python module and have plots of the data./\r\n//\r\n/still need to figure out scaling and such.. but so far so good. 
Last edit: 13 years 2 months ago by gillottir.

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #547 by ganzziani
Let me know if you can share the code.

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #548 by gillottir
For sure, I have no qualms about sharing the code and I'll most likely start a project on google code or github.. I have a crude python class in the works to make things a tad bit easier on the user end to deal with..

I'm having some issues with matching the voltage with the data out that I have, I'm getting the voltage divider settings and attempting to divide it properly.. which makes me wonder if I'm getting the data properly.. If I receive the data as an unsigned char I get values ranging from 0 to 255 and the data seems to visually match up with what I see on the device. but I need to do a lot of funny math to try to get the voltage values to match reality.. If I receive the data as a signed char I get a mix of negative and positive values, it appears to be a better set of data considering I'm playing with sine waves for my plot data, but when I plot the data it looks distorted it seems to invert the peaks of the waves.. I'm wondering if I have to consider little-endian or big-endian byte order and such.. I need to look into that when I get the time again.

I'll post a link to the code when I decide to bring it public.

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago - 13 years 2 months ago #549 by ganzziani
You can also take a look at the source code for the PC interface: www.gabotronics.com/download/xprotolab/x...interface-source.zip
Last edit: 13 years 2 months ago by ganzziani.

Please Log in or Create an account to join the conversation.

Time to create page: 0.201 seconds
Powered by Kunena Forum