These are chat archives for machinekit/machinekit

6th
Oct 2016
zhivko
@zhivko
Oct 06 2016 08:54
I am trying to implement MT_HALRCOMP_SET - I see handle is optional but somwhow the value (confirmed from halscope) stays 0.
On console I get:
handle_command_input: req=type: MT_HALRCOMP_SET
pin {
  type: HAL_FLOAT
  name: "myini.maxvelocity_4"
  dir: HAL_OUT
  halfloat: 10
}

send_pbcontainer: type: MT_PING
pin {
  type: HAL_FLOAT
  name: "myini.maxvelocity_4"
  handle: 729
  dir: HAL_OUT
  halfloat: 0
  linked: false
  epsilon: 1e-05
  flags: 0
}
I binded component before sending MT_HALRCOMP_SET with MT_HALRCOMP_BIND... how can I troubleshoot why value is not changed?
looking at: haltalk_command.cc
Michael Haberler
@mhaberler
Oct 06 2016 08:58
just because the proto defn says. "optional" it is not optional in the request
zhivko
@zhivko
Oct 06 2016 08:58
so handle is missing??
Michael Haberler
@mhaberler
Oct 06 2016 08:59
debug: well as before: use gdb on haltalk
cant read the. ode now so pls check yourself
zhivko
@zhivko
Oct 06 2016 09:00
ah ok. you mean code probablyy ;)
Michael Haberler
@mhaberler
Oct 06 2016 09:00
what is the response tohal rcompset?
yes
zhivko
@zhivko
Oct 06 2016 09:01
response is:
pin {
  type: HAL_FLOAT
  name: "myini.maxvelocity_4"
  handle: 729
  dir: HAL_OUT
  halfloat: 0
  linked: false
  epsilon: 1e-05
  flags: 0
}
oh you mean on client ?
will check this also... but console only outputs:
pin {
  type: HAL_FLOAT
  name: "myini.maxvelocity_4"
  handle: 729
  dir: HAL_OUT
  halfloat: 0
  linked: false
  epsilon: 1e-05
  flags: 0
}
Michael Haberler
@mhaberler
Oct 06 2016 09:02
this is not a response nsg, type field missing
zhivko
@zhivko
Oct 06 2016 09:02
from code of haltalk_command.cc:
// otherwise reply only if explicitly required:
    if (self->rx.has_reply_required() && self->rx.reply_required()) {
So obviously I need request response...
ah
after that - I get:
11:04:05 Unknown message: MT_HALRCOMP_ACK
11:04:05 Unknown message: MT_HALRCOMP_ACK
So it MT_HALRCOMP_ACK message...
SO I now have
D: 16-10-05 23:35:55 [017] 56E58679-B43F81A0
D: 16-10-05 23:35:55 [042] 0883021222080212136D79696E692E6D617876656C6F636974795F3420203100000000...
handle_command_input: req=type: MT_HALRCOMP_SET
pin {
  type: HAL_FLOAT
  name: "myini.maxvelocity_4"
  dir: HAL_OUT
  halfloat: 120
}
reply_required: true

send_pbcontainer: type: MT_HALRCOMP_ACK
pin {
  type: HAL_FLOAT
  name: "myini.maxvelocity_4"
  handle: 729
  dir: HAL_OUT
  halfloat: 0
  linked: false
  epsilon: 1e-05
  flags: 0
}

D: 16-10-05 23:35:56 [017] 56E58679-B43F81A0
D: 16-10-05 23:35:56 [003] 08D201
zhivko
@zhivko
Oct 06 2016 09:10
Probably i miss handle data in MT_HALRCOMP_SET will try that...
zhivko
@zhivko
Oct 06 2016 09:22
Ah yes - handle missing - now works ;)
zhivko
@zhivko
Oct 06 2016 09:28

I thought I could change maxvelocity of stepgen with:

net maxvelocity_3    myini.maxvelocity_3    => hpg.stepgen.03.maxvel

but seems hpg.stepgen.03.maxvel stays same all the time...

zhivko
@zhivko
Oct 06 2016 09:42
AH - ok - seems that that was just issue that halcmd -f 3D.postgui.hal not completed as it should...
It works now... :) thx