View Single Post
Old 03-14-2016, 01:07 PM   #2630 (permalink)
thingstodo
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 746
Thanked 565 Times in 447 Posts
Quote:
Originally Posted by shaggythegangsta View Post
Hello guys i "All thanks to e*clipse" started trying the code on dspic30f6010a
serial comunication runs fine, configuration commands works just fine.. streaming part i'don't know how it works.. i someone wants to explain....
You set the 'flags' of all of the variables that you want to stream to 1

I think these are all of them:
stream-time 1
stream-id 1
stream-iq 1
stream-idref 1
stream-iqref 1
stream-ia 1
stream-ib 1
stream-ic 1
stream-percent-volts 1
stream-battery-amps 1
stream-raw-throttle 1
stream-throttle 1
stream-temperature 1
stream-slip-speed 1
stream-electrical-speed 1
stream-mechanical-speed 1

The you set your data-stream-period, which is how often you want them to print on the screen. 1000 = 1 second.

data-stream-period 1000

And this is how they will print out on the terminal screen:

Code:
time,Id,Iq,IdRef,IqRef,Ia,Ib,Ic,percentVolts,batteryAmps,rawThrottle,throttle,temperaure,slipSpeed,electricalSpeed,mechanicalSpeed,
00001,-004.3,-002.0,+000.0,+000.0,+002.3,+002.3,-004.7,000,+000.0,0438,-2146,013,-0398,-00398,+00000,
01001,-004.4,-001.5,+000.0,+000.0,+002.3,+002.3,-004.7,000,+000.0,0438,-2146,013,-0147,-00147,+00000,
02001,-005.5,+000.7,+000.0,+000.0,+004.6,+000.0,-004.7,000,+000.0,0438,-2146,013,-0045,-00045,+00000,
03001,-009.9,+000.9,+000.0,+000.0,+007.0,+002.3,-009.4,000,+000.0,0439,-2146,013,+0000,+00000,+00000,
04001,-007.1,+000.9,+000.0,+000.0,+004.6,+002.3,-007.1,000,+000.0,0438,-2146,013,-0060,-00060,+00000,
05001,-007.1,-001.1,+000.0,+000.0,+004.6,+002.3,-007.1,000,+000.0,0438,-2146,013,+0483,+00483,+00000,
Press Return to stop the streaming

Copy the text from your terminal screen to a text file, or capture it to a text file. When you open that file with excel, it imports the columns with commas between them.
  Reply With Quote