Log a poll command response to a channel variable (CV)

The CANGate unit si a CAN to RS232 gateway. It can read 2 CAN lines and GPS mainly used in automotive applications

Log a poll command response to a channel variable (CV)

Postby Shawry » Mon Dec 29, 2014 11:50 am

Hello,
On page 32 of the CANgate users manual. There is a sentence (listed below) about the options for the response to a poll command.
"These commands will normally send a poll command (RP memslot) then parse the response
and either log it directly or assign it to a channel variable (CV)."


In the past I have frequently used the option of logging the response directly. This has worked well, and from the example shown not too hard to understand with my limited programming knowledge.
However I would like to assign the response to a CV, so I can use it as an alarm or trigger.

Is it possible to get more detail on how this command should be written so response is assigned to a CV rather than logged directly?

Kind Regards
Shawry
Newbie
 
Posts: 1
Joined: Fri Sep 12, 2014 4:19 pm

Re: Log a poll command response to a channel variable (CV)

Postby Rudy Gunawan » Tue Jan 06, 2015 10:00 am

Hi Shawry,

Yes it is possible to assign channel variable to capture that return value from RP poll command.
If you see the example:

1SERIAL("\e{RP 1^M}%f","EngSpd~RPM")

%f is parsing the response from RP 1 result and set a label + unit directly.
You may change this into

1SERIAL("\e{RP 1^M}%f[1CV]")

which save the value to 1CV

Best regards,
Rudy
Rudy Gunawan
Guru
 
Posts: 415
Joined: Sun Apr 29, 2012 12:28 am

Re: Log a poll command response to a channel variable (CV)

Postby TariqNewton » Thu Dec 08, 2016 2:11 am

Shawry wrote:Hello,
On page 32 of the CANgate users manual. There is a sentence (listed below) about the options for the response to a poll command.
"These commands will normally send a poll command (RP memslot) then parse the response
and either log it directly or assign it to a channel variable (CV)."


In the past I have frequently used the option of logging the response directly. This has worked well, and from the example shown not too hard to understand with my limited programming knowledge.
However I would like to assign the response to a CV, so I can use it as an alarm or trigger.

Is it possible to get more detail on how this command should be written so response is assigned to a CV rather than logged directly?

Kind Regards


Thanks for information.
TariqNewton
Newbie
 
Posts: 1
Joined: Thu Dec 08, 2016 2:09 am


Return to CANGate

Who is online

Users browsing this forum: No registered users and 1 guest

cron