• Steel Soldiers now has a few new forums, read more about it at: New Munitions Forums!

  • Microsoft MSN, Live, Hotmail, Outlook email users may not be receiving emails. We are working to resolve this issue. Please add support@steelsoldiers.com to your trusted contacts.

AMMPS Generator Series Remote Data

R1ckyb0nd

Member
47
11
8
Location
Ct
I have a CAN to USB adapter from Gridconnect, PN GC-CAN-USB IPEH 002021. I'm also using a 30 day trial of their PCAN-EXPLORER 6. My 485-USB is just one I had laying around from an old security system install, no PN visible. Kloppk, I'm very interested hear what data the ECM replies with from a running system when you get a chance, the DCS sends the same 3 or 4 messages over and over, but anytime I try to inject what seems like a reasonable value (coolant temp, RPM, etc. ) The DCS declares fault 781 and fusses about a reply rate, lol. R1cky, I'm about to go pull the DCS off the full harness and see how the 485 works :)
That is an expensive can to USB, from your message it looks like you are able to get some, if only the same 3/4 messages, from the CAN bus?
Do you know what the CAN baud rate is? I have tried my jetson Nano, and Arduino Uno, and nothing is getting any bus data. The adaptor I have has a 800MHZ crystal, so it can only do 500K CAN bus speed. I wonder if this is the issue.
 

ilajnfae

New member
22
0
1
Location
Kentucky, USA
That is an expensive can to USB, from your message it looks like you are able to get some, if only the same 3/4 messages, from the CAN bus?
Do you know what the CAN baud rate is? I have tried my jetson Nano, and Arduino Uno, and nothing is getting any bus data. The adaptor I have has a 800MHZ crystal, so it can only do 500K CAN bus speed. I wonder if this is the issue.
Based on the oscilloscope rate of 4 microseconds per bit, I chose 250kHz and it seems to be happy with that :)
 

kloppk

Well-known member
Steel Soldiers Supporter
2,145
3,526
113
Location
Pepperell, Massachusetts
Code:
GenSet Voltage L1-L2 = 12 2
GenSet Voltage L2-L3 = 13 2
GenSet Voltage L3-L1 = 14 2
Bus Voltage L1-L2 = 14 37
Bus Voltage L2-L3 = 3C 37
Bus Voltage L3-L1 = 64 37
GenSet Voltage L1N = unknown
GenSet Voltage L2N = unknown
GenSet Voltage L3N = unknown
Bus Voltage L1N = 16 37
Bus Voltage L2N = unknown
Bus Voltage L3N = unknown

GenSet L1 Current = 92 3A
GenSet L2 Current = 93 3A
GenSet L3 Current = 94 3A
GenSet Frequency = A8 37
Bus Frequency = F8 36
Power = 49 38
Fuel Level = 28 28
Battery Voltage = D1 B
Battery Current = 7F C
Oil Pressure = 8 2
Coolant Temperature = A9 D
GenSet Hours = 56 2
What I have as of today.
Will try and mess with the engine code DIP switch tomorrow to try and detect it's codes
PCCodeParameter
64??
7FCBattery Current
D1BBatteryVoltage
8817??
B128??
5B0Battleshort
A9DCoolantTemp
4648FaultCode
4548WarningNumber
4448??
E81Battleshort
2828FuelLevel
F836BusFrequency?
1437BusL1-L2
1637BusL1-N
3C37BusL2-L3
3E37BusL2-N
6437BusL3-L1
6637BusL3-N
8A11??
6710Contactor State 0=Open, 1=Closed
A837GensetFreq
923AL1Current
122GensetL1-L2
F2GensetL1-N
933AL2Current
132GensetL2-L3
102GensetL2-N
943AL3Current
142GensetL3-L1
112GensetL3-N
562EngineHours
8F1Battleshort
4938Power
9C2C??
6229??
6629??
82OilPressure
8911Reconnect 2=120/240, 3=120, 0=208 ?? Need to recheck this
6A20??
EC1??
4F10??
6B20??
8E1??
 
Last edited:

R1ckyb0nd

Member
47
11
8
Location
Ct
Based on the oscilloscope rate of 4 microseconds per bit, I chose 250kHz and it seems to be happy with that :)
I do not have an scope. When I connect a multimeter, I get 3.3~ volts across K to ground and 1.75V L to ground. These voltage never seem to change.
You mentioned doing something to send Canbus data. What else other than connecting k and l to send Canbus?
 
Last edited:

ilajnfae

New member
22
0
1
Location
Kentucky, USA
Good afternoon, sorry for the delay. So if you have a ground on J3-LL, your DCS should think that it is connected to a 30 kW, 120/208 VAC, 60 Hz system. Is that accurate? I've just put a meter across J3-K and J3-L, and can confirm that I see approximately the same results. My interpretation would be that because meters can only create an average for very fast signals (like 250 kHz), that you are in fact seeing activity on the CAN bus. I'm not familiar with the equipment you are using to try to pull data off, but I'm reasonably confident that the unit is transmitting on the bus. Let me know how else I can help!
 

R1ckyb0nd

Member
47
11
8
Location
Ct
Good afternoon, sorry for the delay. So if you have a ground on J3-LL, your DCS should think that it is connected to a 30 kW, 120/208 VAC, 60 Hz system. Is that accurate? I've just put a meter across J3-K and J3-L, and can confirm that I see approximately the same results. My interpretation would be that because meters can only create an average for very fast signals (like 250 kHz), that you are in fact seeing activity on the CAN bus. I'm not familiar with the equipment you are using to try to pull data off, but I'm reasonably confident that the unit is transmitting on the bus. Let me know how else I can help!
Are you just connecting CAN H to K and CAN low to L? are you connecting grounds to the CAN signals? I am only getting error frames when connected and I know my CAN reading Hardware is setup correctly as I now have multiple hardware setups and can pass CAN data between them, just not the DCS.

Where did you get the 30 trial of PCAN explorer? I do not see a way to download it?



Finally, Got some CAN BUS data.. now to get this working on Linux and not windows.

I am also only getting four Ids,

0xC0000DCData FrameExtend Frame40X|19 00 00 00Success
0x18F001DCData FrameExtend Frame70X|00 00 00 10 00 00 00Success
0x18FEF1DCData FrameExtend Frame80X|FF FF FF FF FF FF FF 00Success
0x18DF00DCData FrameExtend Frame80X|3F FF FF FF FF FF FF FFSuccess

I will try to get to the generator soon and connect everything up and see what I can get. I would like to go through the diag port near the ECU.

Reading up on J1939 we may need a DBC file to decode these, as there are offset and salting going on.

Thank you,

Rick
 
Last edited:

ilajnfae

New member
22
0
1
Location
Kentucky, USA
Are you just connecting CAN H to K and CAN low to L? are you connecting grounds to the CAN signals? I am only getting error frames when connected and I know my CAN reading Hardware is setup correctly as I now have multiple hardware setups and can pass CAN data between them, just not the DCS.

Where did you get the 30 trial of PCAN explorer? I do not see a way to download it?



Finally, Got some CAN BUS data.. now to get this working on Linux and not windows.

I am also only getting four Ids,

0xC0000DCData FrameExtend Frame40X|19 00 00 00Success
0x18F001DCData FrameExtend Frame70X|00 00 00 10 00 00 00Success
0x18FEF1DCData FrameExtend Frame80X|FF FF FF FF FF FF FF 00Success
0x18DF00DCData FrameExtend Frame80X|3F FF FF FF FF FF FF FFSuccess

I will try to get to the generator soon and connect everything up and see what I can get. I would like to go through the diag port near the ECU.

Reading up on J1939 we may need a DBC file to decode these, as there are offset and salting going on.

Thank you,

Rick
Good morning! Sorry for the delay. Can confirm that those are the main words I see as well. I also get retransmit requests when I switch my ENG ID in and out of modes that use CANbus, just before it declares degraded CAN bus. Does your capture give you any information about how often each of those occurs?
 

R1ckyb0nd

Member
47
11
8
Location
Ct
Good morning! Sorry for the delay. Can confirm that those are the main words I see as well. I also get retransmit requests when I switch my ENG ID in and out of modes that use CANbus, just before it declares degraded CAN bus. Does your capture give you any information about how often each of those occurs?
Yesterday, I was able to get to a running generator and got a lot more information. I have been looking into decoding this information and it seems like some might match SAE 1939 specs and some the math is off or there is no data in the SPN where I know something should be.

18DF00DCDF00
57088​
Stop Start Broadcast
18EAFFFEEAFF
60159​
ISO Request
18EBFF00EBFF
60415​
"ISO Transport Protocol, Data T
18ECFF00ECFF
60671​
Transport Protocol - Connection
18EEFF00EEFF
61183​
ISO Address Claim
18EEFF0FEEFF
61183​
ISO Address Claim
18F001DCF001
61441​
Electronic Brake Controller 1
18F00100F001
61441​
Electronic Brake Controller 1
0CF00300F003
61443​
Electronic Engine Controller 2
0CF00400F004
61444​
Electronic Engine Controller 1
0CFD9200FD92
64914​
Engine Operating Information
18FDCA00FDCA
64970​
Intermediate Speed Control
18FEBD00FEBD
65213​
Fan Drive #1
18FECA00FECA
65226​
Active Diagnostic Trouble Codes
18FEDF00FEDF
65247​
Electronic Engine Controller 3
18FEE400FEE4
65252​
Shutdown
18FEEE00FEEE
65262​
Engine Temperature 1
18FEEF00FEEF
65263​
Engine Fluid Level/Pressure 1
18FEF000FEF0
65264​
Power Takeoff Information
18FEF1DCFEF1
65265​
Cruise Control/Vehicle Speed 1
18FEF100FEF1
65265​
Cruise Control/Vehicle Speed 1
18FEF200FEF2
65266​
Fuel Economy (Liquid)
18FEF500FEF5
65269​
Ambient Conditions
18FEF600FEF6
65270​
Intake/Exhaust Conditions 1
18FEF700FEF7
65271​
Vehicle Electrical Power 1
18FEFF00FEFF
65279​
Operator indicators
 

ilajnfae

New member
22
0
1
Location
Kentucky, USA
Yesterday, I was able to get to a running generator and got a lot more information. I have been looking into decoding this information and it seems like some might match SAE 1939 specs and some the math is off or there is no data in the SPN where I know something should be.

18DF00DCDF00
57088​
Stop Start Broadcast
18EAFFFEEAFF
60159​
ISO Request
18EBFF00EBFF
60415​
"ISO Transport Protocol, Data T
18ECFF00ECFF
60671​
Transport Protocol - Connection
18EEFF00EEFF
61183​
ISO Address Claim
18EEFF0FEEFF
61183​
ISO Address Claim
18F001DCF001
61441​
Electronic Brake Controller 1
18F00100F001
61441​
Electronic Brake Controller 1
0CF00300F003
61443​
Electronic Engine Controller 2
0CF00400F004
61444​
Electronic Engine Controller 1
0CFD9200FD92
64914​
Engine Operating Information
18FDCA00FDCA
64970​
Intermediate Speed Control
18FEBD00FEBD
65213​
Fan Drive #1
18FECA00FECA
65226​
Active Diagnostic Trouble Codes
18FEDF00FEDF
65247​
Electronic Engine Controller 3
18FEE400FEE4
65252​
Shutdown
18FEEE00FEEE
65262​
Engine Temperature 1
18FEEF00FEEF
65263​
Engine Fluid Level/Pressure 1
18FEF000FEF0
65264​
Power Takeoff Information
18FEF1DCFEF1
65265​
Cruise Control/Vehicle Speed 1
18FEF100FEF1
65265​
Cruise Control/Vehicle Speed 1
18FEF200FEF2
65266​
Fuel Economy (Liquid)
18FEF500FEF5
65269​
Ambient Conditions
18FEF600FEF6
65270​
Intake/Exhaust Conditions 1
18FEF700FEF7
65271​
Vehicle Electrical Power 1
18FEFF00FEFF
65279​
Operator indicators
Congratulations! That is SPECTACULAR! I'm so jealous you have a running generator you can vampire into! I have the full 1939 spec, so I'll see what I can do about generating some of these words with values and fire them into the datastream through the PCAN-Explorer!
 

kloppk

Well-known member
Steel Soldiers Supporter
2,145
3,526
113
Location
Pepperell, Massachusetts
What I found was the handshake to establish communications thru the remote port seems to use/need minimum delays between sending each of the handshake messages to the DCS. The delays are what I measured using a PC with the Remote Monitor software doing the handshaking and an ESP32 sniffing the communications and measuring the individual delays between the 248 messages.
I added say 10% to each delay for buffer in the table below. Using the delays in the table I was able to complete the handshaking and start requests and get the 44 parameters back from the DCS. It works OK for a period of time and then seems to stop getting parameters. Just another bug to solve.

I found I could ignore all DCS responses during the handshaking. With my 1030 the DCS responses were always the same during handshaking. Not sure what's in all the DCS responses during handshaking mean. Responses varied from 3 bytes to about 93 bytes in length.

Here is a table showing what I got to work for handshaking for the delays between messages.
To read the table....
Send handshake message 0 then wait at lease 254 milliseconds before sending handshake 1.
Send handshake message 1 then wait at lease 236 milliseconds before sending handshake 2.
When done wait 1 second before requesting the parameters from the DCS.
0
254​
1
236​
2
240​
3
93​
4
391​
5
58​
6
8​
7
7​
8
72​
9
8​
10
8​
11
33​
12
8​
13
7​
14
8​
15
8​
16
33​
17
33​
18
33​
19
33​
20
8​
21
8​
22
33​
23
33​
24
11​
25
53​
26
8​
27
33​
28
8​
29
8​
30
8​
31
33​
32
8​
33
8​
34
11​
35
48​
36
8​
37
8​
38
8​
39
8​
40
12​
41
48​
42
8​
43
8​
44
33​
45
8​
46
8​
47
8​
48
8​
49
8​
50
8​
51
8​
52
21​
53
21​
54
21​
55
21​
56
20​
57
7​
58
8​
59
8​
60
8​
61
8​
62
7​
63
8​
64
8​
65
8​
66
8​
67
8​
68
8​
69
8​
70
21​
71
21​
72
21​
73
20​
74
21​
75
21​
76
21​
77
21​
78
21​
79
8​
80
8​
81
8​
82
8​
83
8​
84
7​
85
8​
86
8​
87
7​
88
21​
89
8​
90
20​
91
8​
92
7​
93
8​
94
8​
95
7​
96
8​
97
8​
98
8​
99
8​
100
8​
101
8​
102
7​
103
8​
104
8​
105
8​
106
8​
107
8​
108
8​
109
8​
110
8​
111
8​
112
8​
113
8​
114
8​
115
8​
116
8​
117
8​
118
7​
119
30​
120
8​
121
8​
122
8​
123
8​
124
8​
125
21​
126
20​
127
8​
128
8​
129
21​
130
21​
131
9​
132
8​
133
20​
134
20​
135
8​
136
7​
137
8​
138
8​
139
8​
140
8​
141
8​
142
8​
143
8​
144
8​
145
8​
146
8​
147
8​
148
8​
149
8​
150
8​
151
8​
152
8​
153
8​
154
8​
155
8​
156
8​
157
10​
158
10​
159
10​
160
10​
161
10​
162
10​
163
10​
164
10​
165
10​
166
10​
167
10​
168
10​
169
10​
170
10​
171
10​
172
10​
173
10​
174
10​
175
10​
176
10​
177
10​
178
10​
179
10​
180
10​
181
10​
182
10​
183
10​
184
10​
185
10​
186
10​
187
10​
188
10​
189
8​
190
8​
191
8​
192
8​
193
10​
194
10​
195
10​
196
10​
197
10​
198
10​
199
10​
200
10​
201
10​
202
10​
203
10​
204
10​
205
10​
206
10​
207
10​
208
10​
209
10​
210
10​
211
10​
212
10​
213
10​
214
10​
215
10​
216
10​
217
10​
218
10​
219
10​
220
10​
221
10​
222
10​
223
10​
224
10​
225
8​
226
8​
227
22​
228
8​
229
20​
230
9​
231
9​
232
14​
233
14​
234
14​
235
14​
236
14​
237
14​
238
14​
239
14​
240
14​
241
14​
242
14​
243
14​
244
14​
245
14​
246
14​
247
14​
 

R1ckyb0nd

Member
47
11
8
Location
Ct
Made some good progress today, I could not get the handshake to work, use pyserial so I just started sending the 44 request commands and it seems to return valid data.
Here is what was returned from a non-connected DCS using @kloppk's table.
As you can see there are some returns that are not 100% hex and I seem to not be getting the checksum each time. Look at battery voltage \x93\x02\xcc\x07Z' is returned taking 2 bytes for the data and reading it backwards give me 07cc which is 1996 which directly correlates to 19.96 volts that RMT shows. However I do not know what the Z is and it does not have the checksum.
??\x93\x01\x02\x90'
Battery Current\x93\x02 \x03\xb2'
BatteryVoltage\x93\x02\xcc\x07Z'
??\x93\x01\x00\x92'
??\x93\x01\x00\x92'
Battleshort\x93\x01\x01\x93'
CoolantTemp\x93\x02\xff\x7f\x11'
FaultCode\x93\x02\x00\x00\x91'
WarningNumber\x93\x02\xb9\x01)'
??\x93\x02\x00\x00\x91'
Battleshort\x93\x01\x00\x92'
FuelLevel\x93\x02\xfd\xff\x93'
BusFrequency?\x93\x04\x00\x00\x00\x00\x97'
BusL1-L2\x93\x02\x00\x00\x91'
BusL1-N\x93\x02\x00\x00\x91'
BusL2-L3\x93\x02\x00\x00\x91'
BusL2-N\x93\x02\x00\x00\x91'
BusL3-L1\x93\x02\x00\x00\x91'
BusL3-N\x93\x02\x00\x00\x91'
??\x93\x01\n\x98'
Contactor State 0=Open, 1=Closed\x93\x01\x00\x92'
GensetFreq\x93\x042\x00\x00\x00\xa5'
L1Current\x93\x02\x00\x00\x91'
GensetL1-L2\x93\x02\x00\x00\x91'
GensetL1-N\x93\x02\x00\x00\x91'
L2Current\x93\x02\x00\x00\x91'
GensetL2-L3\x93\x02\x00\x00\x91'
GensetL2-N\x93\x02\x00\x00\x91'
L3Current\x93\x02\x00\x00\x91'
GensetL3-L1\x93\x02\x00\x00\x91'
GensetL3-N\x93\x02\x00\x00\x91'
EngineHours\x93\x04\xfcA\x83\x00\xa9'
Battleshort\x93\x01\x01\x93'
Power\x93\x02\x00\x00\x91'
??\x93\x01\x00\x92'
??\x93\x01\x00\x92'
??\x93\x01\x01\x93'
OilPressure\x93\x02\xfd\x7f\x13'
Reconnect 2=120/240, 3=120, 0=208 ?? Need to recheck this\x93\x01\x00\x92'
??\x93\x02\x00\x00\x91'
??\x93\x01\x00\x92'
??\x93\x01\x00\x92'
??\x93\x02\x00\x00\x91'
??\x93\x01\x00\x92'
 

R1ckyb0nd

Member
47
11
8
Location
Ct
I went straight to 115200.
Can you post your C code for the math, I would like to see if I can mimic it in python?
 

kloppk

Well-known member
Steel Soldiers Supporter
2,145
3,526
113
Location
Pepperell, Massachusetts
I went straight to 115200.
Can you post your C code for the math, I would like to see if I can mimic it in python?
Interesting. I'll have to try 115200 without handshaking the next time I fiddle with that project.
Which math? Decoding the values coming back from the DCS??
 
Last edited:

R1ckyb0nd

Member
47
11
8
Location
Ct
Interesting. I'll have to try 115200 without handshaking the next time I fiddle with that project.
Which math? Decoding the values coming back from the DCS??
Yes like how do you pull the 2nd hex value to get the how many bytes the data is, then reverse digits, then convert to Dec.
 

kloppk

Well-known member
Steel Soldiers Supporter
2,145
3,526
113
Location
Pepperell, Massachusetts
For example you read back \x93\x02\x00\x00\x91'
The 93 is just a transmission header. Ignore it.
The 02 indicates that the next 2 bytes are the data.
00 & 00 are the data.
The 91 is the checksum.

Here is the code I use to decode the data coming back from the DCS. The DCS response bytes are in decimal in the array DCSParams. It's a 44 x 7 array.
Each of the 44 DCS responses are stored in a single row in the array as they are read in. DCSParam[0,x] holds the first response, DCSParam[1,x] holds the second response, etc.
Since the number of bytes in each response is fixed I simply hard coded the decode for each DCS parameter.

Ignore the Serial Swap code. I use that for multiplexing the UART port on the 8266 between the DCS and the terminal display (Arduino)

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////// Decode & Print Params Subroutine /////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void DecodeParams()
{

//Decode parameters

Serial.swap(); // Switch back to diagnostic port
delayMicroseconds(50);

// Row 0
float Pval = DCSParams[0][2]; //
Serial.print("Row 0 ?? ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal

//Battery Current Row 1
Pval = DCSParams[1][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[1][2];
Serial.print("Row 1 BatteryCurrent ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal

//Battery Voltage Row 2
Pval = DCSParams[2][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[2][2];
Pval = Pval / 100.0;
Serial.print("Row 2 BatteryVoltage ");
Serial.print(Pval);
Serial.println(" Volts");
delay(5); //Time for data to be printed on terminal

//Battle Short Status Row 3
Pval = DCSParams[3][2]; //
Serial.print("Row 3 BattleShort0=Off,1=ON ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal

// Row 4
Pval = DCSParams[4][2]; //
Serial.print("Row 4 ?? ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal

// Row 5
Pval = DCSParams[5][2]; //
Serial.print("Row 5 Battleshort? ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal


//Coolant Temp Row 6
Pval = DCSParams[6][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[6][2];
Serial.print("Row 6 CoolantTemp ");
Serial.print(Pval);
Serial.println(" Degrees F");
delay(5); //Time for data to be printed on terminal


//Fault Code Row 7
Pval = DCSParams[7][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[7][2];
Serial.print("Row 7 FaultCode ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal

//Warning Code Number Row 8
Pval = DCSParams[8][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[8][2];
Serial.print("Row 8 WarningCodeNumber ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal

// Row 9
Pval = DCSParams[9][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[9][2];
Serial.print("Row 9 ?? ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal

// Row 10
Pval = DCSParams[10][2]; //
Serial.print("Row 10 Battleshort ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal

//Fuel Level Row 11
Pval = DCSParams[11][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[11][2];
Pval = Pval / 10.0;
Serial.print("Row 11 FuelLevel ");
Serial.print(Pval);
Serial.println(" %");
delay(5); //Time for data to be printed on terminal

//Bus Frequency Row 12
Pval = DCSParams[12][5];
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[12][4];
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[12][3];
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[12][2];
Pval = Pval / 1000.0;
Serial.print("Row 12 BusFrequency ");
Serial.print(Pval);
Serial.println(" Hz");
delay(5); //Time for data to be printed on terminal

//Bus L1-L2 Row 13
Pval = DCSParams[13][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[13][2];
Serial.print("Row 13 BusL1-L2 ");
Serial.print(Pval);
Serial.println(" Volts");
delay(5); //Time for data to be printed on terminal

//Bus L1-N VAC Row 14
Pval = DCSParams[14][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[14][2];
Serial.print("Row 14 BusL1-N ");
Serial.print(Pval);
Serial.println(" Volts");
delay(5); //Time for data to be printed on terminal

//Bus L2-L3 Row 15
Pval = DCSParams[15][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[15][2];
Serial.print("Row 15 BusL2-L3 ");
Serial.print(Pval);
Serial.println(" Volts");
delay(5); //Time for data to be printed on terminal

//Bus L2-L3 Row 16
Pval = DCSParams[16][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[16][2];
Serial.print("Row 16 Voltage?? ");
Serial.print(Pval);
Serial.println(" Volts");
delay(5); //Time for data to be printed on terminal

//Bus L3-L1 Row 17
Pval = DCSParams[17][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[17][2];
Serial.print("Row 17 BusL3-L1 ");
Serial.print(Pval);
Serial.println(" Volts");
delay(5); //Time for data to be printed on terminal


//Bus L3-L1 Row 18
Pval = DCSParams[18][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[18][2];
Serial.print("Row 18 BusL3L1 ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal

// Row 19
Pval = DCSParams[19][2]; //
Serial.print("Row 19 ?? ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal

//ContactorState Row 20
Pval = DCSParams[20][2]; //
Serial.print("Row 20 ContactorState,0=Open,1=Closed ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal

//Genset Freq Row 21
Pval = DCSParams[21][5];
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[21][4];
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[21][3];
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[21][2];
Pval = Pval / 1000.0;
Serial.print("Row 21 GensetFreq ");
Serial.print(Pval);
Serial.println(" Hz");
delay(5); //Time for data to be printed on terminal

//L1 Current Row 22
Pval = DCSParams[22][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[22][2];
Pval = Pval / 10.0;
Serial.print("Row 22 L1Current ");
Serial.print(Pval);
Serial.println(" Amps");
delay(5); //Time for data to be printed on terminal

//Genset L1-L2 Row 23
Pval = DCSParams[23][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[23][2];
Serial.print("Row 23 GensetL1-L2 ");
Serial.print(Pval);
Serial.println(" Volts");
delay(5); //Time for data to be printed on terminal


//Genset L1-N Row 24
Pval = DCSParams[24][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[24][2];
Serial.print("Row 24 GensetL1-N ");
Serial.print(Pval);
Serial.println(" Volts");
delay(5); //Time for data to be printed on terminal

//L2 Current Row 25
Pval = DCSParams[25][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[25][2];
Pval = Pval / 10.0;
Serial.print("Row 25 L2Current ");
Serial.print(Pval);
Serial.println(" Amps");
delay(5); //Time for data to be printed on terminal

//Genset L2-L3 Row 26
Pval = DCSParams[26][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[26][2];
Serial.print("Row 26 GensetL2-L3 ");
Serial.print(Pval);
Serial.println(" Volts");
delay(5); //Time for data to be printed on terminal

//Genset L2-N Row 27
Pval = DCSParams[27][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[27][2];
Serial.print("Row 27 GensetL2-N ");
Serial.print(Pval);
Serial.println(" Volts");
delay(5); //Time for data to be printed on terminal

//L3 Current Row 28
Pval = DCSParams[28][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[28][2];
Pval = Pval / 10.0;
Serial.print("Row 28 L3Current ");
Serial.print(Pval);
Serial.println(" Amps");
delay(5); //Time for data to be printed on terminal

//Genset L3-L1 Row 29
Pval = DCSParams[29][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[29][2];
Serial.print("Row 29 GensetL3-L1 ");
Serial.print(Pval);
Serial.println(" Volts");
delay(5); //Time for data to be printed on terminal

//Genset L3-N Row 30
Pval = DCSParams[30][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[30][2];
Serial.print("Row 30 GensetL3-N ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal


//Engine Hours Row 31
Pval = DCSParams[31][5]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[31][4];
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[31][3];
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[31][2];
Pval = Pval / 3600.0;
Serial.print("Row 31 EngineHours ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal


// Row 32
Pval = DCSParams[32][2]; //
Serial.print("Row 32 Battleshort?? ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal

//KiloWatts Row 33
Pval = DCSParams[33][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[33][2];
Pval = Pval / 10.0;
Serial.print("Row 33 Power ");
Serial.print(Pval);
Serial.println(" Kw");
delay(5); //Time for data to be printed on terminal

// Row 34
Pval = DCSParams[34][2]; //
Serial.print("Row 34 ?? ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal

// Row 35
Pval = DCSParams[35][2]; //
Serial.print("Row 35 ?? ");
Serial.print(Pval);
Serial.println(" ");

// Row 36
Pval = DCSParams[36][2]; //
Serial.print("Row 36 ?? ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal



//Oil Pressure Row 37
Pval = DCSParams[37][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[37][2];
Pval = Pval / 10.0;
Serial.print("Row 37 OilPressure ");
Serial.print(Pval);
Serial.println(" PSI");
delay(5); //Time for data to be printed on terminal

//Reconnect0=208, 2=120/240,3=120 Row 38
Pval = DCSParams[38][2]; //
Serial.print("Row 38 ?? ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal

// Row 39
Pval = DCSParams[39][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[39][2];
Serial.print("Row 39 Reconnect0=208,2=120/240,3=120 ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal

// Row 40
Pval = DCSParams[40][2]; //
Serial.print("Row 40 ?? ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal

// Row 41
Pval = DCSParams[41][2]; //
Serial.print("Row 41 ?? ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal


// Row 42
Pval = DCSParams[42][3]; //
Pval = Pval * 256; //shift value to left 8 bits
Pval = Pval + DCSParams[42][2];
Serial.print("Row 42 ?? ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal

// Row 43
Pval = DCSParams[43][2]; //
Serial.print("Row 43 ?? ");
Serial.print(Pval);
Serial.println(" ");
delay(5); //Time for data to be printed on terminal



PassCount = PassCount + 1;

Serial.swap(); // Switch back to DCS
delayMicroseconds(50);
return;
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
Top