Hi,
I was wondering if anyone here could help me implement a real time line graph into a motor control project that I am working on.
The project is controlling the speed of a DC motor, I would like to graph the Set point vs time and output vs time on a computer. I currently have a live feed of said information to a VB form that can hold it in a text box or write it to a file on a computer. My data scheme follows
$,SSSS,OOOO,\n, which then repeats its self.
The first char is the header the commas are used as delimiters SSSS refers to a 10 bit number of the set point and OOOO is the same but for the output. For example if the a/d conversion of the set point was 1001 in decimal and the output was 988
$,1001,0998,\n,
The line feed is so that I can bring it into excel and graph the information. My issue there is that its time consuming. They do have this data update feature but the fastest refresh rate I can find is once/min.
I was wondering if there is anyone who has used Octave or some other program to rip through a text file and graph its contents. I have tried VB and got it to work but I'm not very efficient at coding in VB so what I came up with is too slow to be of any use to me.
All the information is ASCII so that excel picks it up; I have to convert it all back to decimal to manipulate it so it seems. I can modify how the information is sent also, its just dependent on my PIC.
I can also attach my vb code if someone is willing to take a look at how I convert this and try to graph it.
Oh and one last important thing I just thought of... the PID function operates every 4 milliseconds which how frequently the above msg shows up to the computer.
Cheers!
I was wondering if anyone here could help me implement a real time line graph into a motor control project that I am working on.
The project is controlling the speed of a DC motor, I would like to graph the Set point vs time and output vs time on a computer. I currently have a live feed of said information to a VB form that can hold it in a text box or write it to a file on a computer. My data scheme follows
$,SSSS,OOOO,\n, which then repeats its self.
The first char is the header the commas are used as delimiters SSSS refers to a 10 bit number of the set point and OOOO is the same but for the output. For example if the a/d conversion of the set point was 1001 in decimal and the output was 988
$,1001,0998,\n,
The line feed is so that I can bring it into excel and graph the information. My issue there is that its time consuming. They do have this data update feature but the fastest refresh rate I can find is once/min.
I was wondering if there is anyone who has used Octave or some other program to rip through a text file and graph its contents. I have tried VB and got it to work but I'm not very efficient at coding in VB so what I came up with is too slow to be of any use to me.
All the information is ASCII so that excel picks it up; I have to convert it all back to decimal to manipulate it so it seems. I can modify how the information is sent also, its just dependent on my PIC.
I can also attach my vb code if someone is willing to take a look at how I convert this and try to graph it.
Oh and one last important thing I just thought of... the PID function operates every 4 milliseconds which how frequently the above msg shows up to the computer.
Cheers!