- Posts: 1111
- Thank you received: 0
[solved]Unable to WRITE float pin OUT
X100 Y[40 + #<_hal[mycomp.yo]>] Z800 .... in my gcode I use already #<_hal[mycomp.value] pin with success.
in my comp have this:
In hal configuration I can see change both the value but the GCODE don't work properly ......
WHY??? where is My Mystake .... some ideas? :blush:
I CHANGE THE TITLE BECAUSE BETTER DESCRIBE MY REAL PROBLEM
Please Log in to join the conversation.
I can't load pin in float on user_mainloop in this way: myPinOutFloat = myPinInFloat.... I understand that is not possible this way too:
there is some way to do this ?????? :ohmy: :ohmy: :ohmy: :ohmy:
THE PROBLEM RESULT: I READ THE PIN VALUE BUT NOT SPREADS ALONG THE CODE .
I TRY TO MAKE AN OTHER COMPONENT NOT USER.
Please Log in to join the conversation.
I try to make a component non user ... similar to this:
than I install it with sudo --install tcomp.comp, and put it in myhal.hal file in this way:
at start of myhal file obtai this error:
tcomp.value pin do not exist 4232 ??????????
Please Log in to join the conversation.
than I install it with sudo --install tcomp.comp, and put it in myhal.hal file in this way:
loadrt mycustomkinematics
loadusr -W myfirstcomp
loadrt tcomp
.....
at start of myhal file obtai this error:
tcomp.value pin do not exist 4232 ??????????![]()
![]()
![]()
I thought that perhaps 'value' was a protected name, but it is not
I built your code (had to add license "LGPL" before it would build but thats it) and ran halrun
Normally this error occurs because the pin is referenced before it is created and properly initialised
That is why userspace modules are normally started with loaduser -W to force a wait until ready before continuing.
Alternately it could be you forgot to add it to a thread ( or you added it to a non fp thread?)
regards
Please Log in to join the conversation.
I have load my compom in this way ... is wrong? (yess .... i not correctly addf tcomp .... tanks ... now work but not solve my problem)
PROBLEM:
My intention is to grab encoder position (value .... or some other name ex: valy) and put out a float value for Gcode. Es:
and in gcode
problem2: tcomp.vx1/2 is OK AND WORK PERFECT
tcomp.vy2/1 never updated ... why??????
The second idea is to use sampler and take the data from the FIFO . I already have a component that works and that reads from an ethernet port .
But utilize the fifo it seems ridiculous to do this simple thing.
Why the encoder pin in in tcomp seems not to be used ?
Please Log in to join the conversation.
NOTE: the encoder value change always .... my operation in real world (from a request to an other) is every 0.7 sec.
basically I have a delta pik & place . Every 0.7-0.9 sec try to remove an offset on a Cartesian axis .
Please Log in to join the conversation.
problem2: tcomp.vx1/2 is OK AND WORK PERFECT
tcomp.vy2/1 never updated ... why??????
The obvious difference is that the x values are set and always the same, so they will work.
You transfer the value to cx but never use it?
I would be debugging by printing out the contents of 'value' and cx, even though it will soon fill the terminal, just to see what is happening and if there is some way of printing the encoder output to compare do that too.
regards
Please Log in to join the conversation.
The obvious difference is that the x values are set and always the same, so they will work.
ok ... I had it figured out I also .... but I not undesrtand why .... how cat printf to terminal the result?? I use rtapi_print ... but how terminal call??
Please Log in to join the conversation.
no other .... but in my tcomp I have already insert
I don't know the origin of this error..... :blush: :blush:
OK OK my mystache .... i have not cancel loadrt halsampler that not use yet.
But not print value in my terminal ....
Please Log in to join the conversation.
Ok the terminal fills up early ... but if I see all EMC_TRAJ_LINEAR_MOVE .... i see only GCode coordinate or coordinates that originate from the numbers and not by the variablexample:
Please Log in to join the conversation.
