Multiple internal DM1?
Hi,
Is it possible to have multiple internal DM1? I add one internal DM1 and that is fine but when I add one more the first one will set to active = 0 and will be "green" as in no fault.
All internal DM1 is updated every second when active just as they are if coming in on the CAN bus.
Update with some code:
if (stsEngine0 == ENGINE_STALLED) TxInternalDM1(SPN0);
if (stsEngine1 == ENGINE_STALLED) TxInternalDM1(SPN1);
if (stsEngine2 == ENGINE_STALLED) TxInternalDM1(SPN2);
if (stsEngine3 == ENGINE_STALLED) TxInternalDM1(SPN3);
void TxInternalDM1(int SPN)
{
int sourceAddress;
smRead(VariableIDs.CANPort1_Address, sourceAddress);
smWrite(VariableIDs.Dm1_InternalFMI, 31);
smWrite(VariableIDs.Dm1_InternalLampStatus, 4);
smWrite(VariableIDs.Dm1_InternalPort, 0);
smWrite(VariableIDs.Dm1_InternalSourceAddress, sourceAddress);
smWrite(VariableIDs.Dm1_InternalSPN, SPN);
sendEvent(EventIDs.Dm1_SetInternalFault);
}
Thanks, Joakim
Please sign in to leave a comment.
Comments
0 comments