Recent Posts

Pages: 1 ... 8 9 [10]
91
General Discussion / Re: Starting a new build
« Last post by Rx7man on March 31, 2018, 07:21:42 PM »
yeah, I think that's a good idea anyhow
92
General Discussion / Re: Starting a new build
« Last post by Chewy1576 on March 31, 2018, 05:15:32 PM »
Well my CAN communication code doesn't seem to be working. Using the CAN initialization check from the examples, both processors seem to be activating and talking to their respective CAN boards, but the Uno side isn't sending messages out on the CAN BUS. I have the terminating resistor on the Pro Mini side jumpered on. I'm going to try breaking each float out into it's own CAN transaction.
93
General Discussion / 2013 - 2018 apparently use turbo Speed in the vane calc
« Last post by me78569 on March 31, 2018, 04:20:01 PM »
Found it funny, I remember Steed saying "why would you use shaft speed to control the turbo? OEM doesn't"

well looking at the ecm files cummins trucks 2013 + use shaft speed as well.   The efficently map of the turbo could be pulled from the files.



anyways looks like even cummins decided that shaft speed helps when controlling the turbo.
94
General Discussion / Re: Starting a new build
« Last post by Chewy1576 on March 27, 2018, 06:26:21 PM »
It compiles without errors  ;D

I haven’t had a chance to wire or code the whole CAN interface yet. Hopefully in the next day or two...
95
General Discussion / Re: Starting a new build
« Last post by Rx7man on March 27, 2018, 01:43:11 PM »
That does look much better :).. and it works, right?
96
General Discussion / Re: Starting a new build
« Last post by Chewy1576 on March 27, 2018, 06:43:44 AM »
That cleans things up quite a bit...

Code: [Select]
union fourbyte {
    float f;
    byte b[4];
  };

  fourbyte turbo_speed;
  fourbyte vane_pos;
  fourbyte boost_pressure;
  fourbyte egt;
 
  unsigned long Var1_ID = 0x11E1A300; // Msg ID for Turbo Speed & Vane Position = 300000000 DEC
  byte length = 8; // Send length = 8 bytes
  byte data1[] = {turbo_speed.b[0],turbo_speed.b[1],turbo_speed.b[2],turbo_speed.b[3],vane_pos.b[0],vane_pos.b[1],vane_pos.b[2],vane_pos.b[3]}; // Combine Turbo Speed and Vane Position arrays for one send

    CAN1.send (Var1_ID, extID, length, data1);
   
  unsigned long Var2_ID = 0x127A3980; // Msg ID for Turbo Speed & Vane Position = 310000000 DEC
  byte data2[] = {boost_pressure.b[0],boost_pressure.b[1],boost_pressure.b[2],boost_pressure.b[3],egt.b[0],egt.b[1],egt.b[2],egt.b[3]}; // Combine Boost Pressure and EGT arrays for one send

    CAN1.send (Var2_ID, extID, length, data2);
97
General Discussion / Re: Starting a new build
« Last post by Rx7man on March 27, 2018, 12:30:18 AM »
Oh, the drive rate is how hard the VGT actuator motor is working, it's an 8 bit signed integer.. so -128 to +127
98
General Discussion / Re: Starting a new build
« Last post by Rx7man on March 27, 2018, 12:27:40 AM »
Make the 4 byte union type first, then make an instance of the type for each application of it

it's just another data type, so after making the type,...
Code: [Select]
union fourbyte{
float f;
byte b[4];
}

fourbyteunion egt;
fourbyte union boost_pressure;

//then you access the subtype you want within it.

egt.f = 1.234;
boost_pressure.f = 2.345;

Senddata(egt.b); //where Senddata expects a 4 byte array
99
General Discussion / Re: Starting a new build
« Last post by Chewy1576 on March 26, 2018, 10:36:56 PM »
Had to give this a shot before bed...

Code: [Select]
void C_CANBUS()
{

  union turbo_speed_array { // Create 4 byte array out of Turbo Speed float
    float turbo_speed;
    byte byteTS[4];
  } TS_array;

  union vane_pos_array { // Create 4 byte array out of Vane Position float
    float vane_pos;
    byte byteVP[4];
  } TP_array;
 
  unsigned long Var1_ID = 0x11E1A300; // Msg ID for Turbo Speed & Vane Position = 300000000 DEC
  byte length = 8; // Send length = 8 bytes
  byte data1[] = {TS_array.byteTS[0], TS_array.byteTS[1], TS_array.byteTS[2], TS_array.byteTS[3], TP_array.byteVP[0], TP_array.byteVP[1], TP_array.byteVP[2], TP_array.byteVP[3]}; // Combine Turbo Speed and Vane Position arrays for one send

    CAN1.send (Var1_ID, extID, length, data1);

  union boost_pressure_array { // Create 4 byte array out of Boost Pressure float
    float boost_pressure;
    byte byteBP[4];
  } BP_array;

  union egt_array { // Create 4 byte array out of EGT float
    float egt_float;
    byte byteegt[4];
  } egt_array;
 
  unsigned long Var2_ID = 0x127A3980; // Msg ID for Turbo Speed & Vane Position = 310000000 DEC
  byte data2[] = {BP_array.byteBP[0], BP_array.byteBP[1], BP_array.byteBP[2], BP_array.byteBP[3], egt_array.byteegt[0], egt_array.byteegt[1], egt_array.byteegt[2], egt_array.byteegt[3]}; // Combine Boost Pressure and EGT arrays for one send

    CAN1.send (Var2_ID, extID, length, data2);

}
100
General Discussion / Re: Starting a new build
« Last post by Chewy1576 on March 26, 2018, 08:33:10 PM »
What does the drive rate parameter mean? I’m already planning to display actual vane position. Maybe I can show actuator temperature on the same line. Here’s a quick video of what I had a few days ago, it’s been tweaked a little since then.
Pages: 1 ... 8 9 [10]