## Forums

#### Guest

Welcome Guest, posting in this forum require registration.

 Pages: [1]
Author Topic: ON/OFF alarm
Member
Posts: 3
 ON/OFF alarmon: September 6, 2023 (GMT)

Hi,

i am playing with Torque Pro alarms these days and i need some help from community here.

I have a PID with ON/OFF value, 0 – OFF, 100 – ON.
I would like to set up two alarms, first one will trigger when PID value goes to ON and the second alarm that will trigger when PID goes from ON to OFF.

Is it possible to achieve this? I cannot find any example for this type of alarms.

cintakc
Member
Posts: 1663
 Re: ON/OFF alarmon: September 6, 2023 (GMT)

write more about your PID and what is its value in PID Test mode
create two PIDs, one will alarm when the value of A is 100, and in the second, make the formula 100-(A), that is, when A=0, it will be 100-0=100 and the alarm will also be triggered

Member
Posts: 3
 Re: ON/OFF alarmon: September 7, 2023 (GMT)

Ok i understand, so i must create another custom PID with custom formula and set the second alarm on this second PID.

I already have PID for DPF regeneration status (0x220380, formula: A, unit type: ON/OFF, min value: 0, max value: 100).

I will create second PID for DPF regeneration status inverted (0x220380, formula: 100-A, unit type: ON/OFF, min value: 0, max value: 100).

I will try this and see if it works.

Thanks

cintakc
Member
Posts: 1663
 Re: ON/OFF alarmon: September 7, 2023 (GMT)

I think 100 should not be, if you have some bit responsible for your parameter in the response byte, then there should be one of these values 1,2,4,8,16,32,64,128
give an example of a byte response to your request 0x220380 and which bit in it is responsible for your parameter

Capp777
Member
Posts: 2994
 Re: ON/OFF alarmon: September 7, 2023 (GMT)

https://wiki.torque-bhp.com/view/Equations#LOOKUP.28.7BVALUE.7D:.7BDEFAULT.7D:.7BKEY1.7D.7BOPERATOR.7D.7BVALUE1.7D:.7BKEY2.7D.7BOPERATOR.7D.7BVALUE2.7D:.E2.80.A6etc.29

Also should be able to long
press the display to access
Torque’s builtin alarm settings.

Member
Posts: 3
 Re: ON/OFF alarmon: September 8, 2023 (GMT)

I tested PID 220380 today. The ON/OFF display gauge connected to this PID shows Off, The equation (equation = A) returns 0 and test returns hex value 7E80762038000000000.

On the other hand, the equation always returned 1 when the display gauge was showing On. Currently I can not test the hex value for this because conditions are not met. Anyway I assume only 1 bit will change. In the near future I will test this condition too.

Vasilich
Member
Posts: 223
 Re: ON/OFF alarmon: September 8, 2023 (GMT)

Quote from adev1 on September 8, 2023
I tested PID 220380 today. The ON/OFF display gauge connected to this PID shows Off, The equation (equation = A) returns 0 and test returns hex value 7E80762038000000000.

7E8 – control unit block address