Page 1 of 1

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

PostPosted: Mon Dec 29, 2014 11:50 am
by Shawry
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

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

PostPosted: Tue Jan 06, 2015 10:00 am
by Rudy Gunawan
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

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

PostPosted: Thu Dec 08, 2016 2:11 am
by TariqNewton
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.