
76
Instruction book, PHD API Reference
CANopen channel events
Appendix B
cos.set_error
Event
cos.set_error
Event Data
Keys
Values
Description
error_code
<0..65535>
Error code
error_reg
<0..255>
Error register
count
<0..255>
Occurrence count
value
<0..65535>
Data for the EMCY message.
Direction
output
Channel
cos
Notes
EMCY Send Event.
This event is sent by the application to set the error code in the CANopen stack for
the PHD.
The example below assumes the Storyboard application is set up to call Lua function
canopen_set_error
with arguments of
code
,
reg
, count and
value
.
Lua Example
function
canopen_rx_emcy
(
mapargs
)
local
ev
=
mapargs
.context_event_data
local
code
=
ev
["
error_code
"]
local
reg
=
ev
["
error_reg
"]
local
count
=
ev
["
count
"]
local
value
=
ev
["
value
"]
local
data
= {}
if
(
code
~=
nil and
reg
~=
nil and
count
~=
nil and
value
~=
nil
)
then
data
["
code
"] =
code
data
["
reg
"] =
reg
data
["
count
"] =
count
data
["
value
"] =
value
gre.
send_event_data("
cos.set_error
",
"2
u1 error_code 1u1 error_reg 1u1 count 2u1 value
",
data
, "
cos
")
end
end
Содержание PHD28
Страница 1: ...Parker Hannifin Display PHD User Guide UG PHD 1040001 201707 010...
Страница 52: ...44 PHD Mounting the PHD 9 1 2 PHD50 Figure 18 PHD50 dimensions mm...
Страница 53: ...User Guide 45 Mounting the PHD 9 1 3 PHD70 Figure 19 PHD70 dimensions mm...
Страница 58: ...Parker Hannifin Display PHD User Guide HY33 5021 IB US...
Страница 59: ...PHD Network Interface Configuration Publ no HY33 5021 M1 UK Edition 2017 02 02...
Страница 75: ...PHD API Reference Publ no HY33 5021 M2 UK Edition 2017 02 13...