command format problem

More
16 Jan 2016 23:09 #68542 by wl888
wl888 created the topic: command format problem
Hi All
So far have managed to get all the commands working on individual buttons, now to group them in a ladder.
I have got to a certain point and hit a wall, not surprising as i'm new to this, but believe i am on the right track.
I have attached a copy of the custom_postgui.hal,
I put rem comments and line numbers in to help me with the debugging.
lines 12-15 are mine and work, the hal meter registers a button push.
lines 15-22 and 32 to 43 are from another source and work.
line 23-32 and 43-54 are mine and are giving me the problems

In line 23-32 i know i can't use motion.in-position for each command, they are there to fill out the command line as i don't know which one to use, have tried several, but no luck, they are there for this post only.
Lines 43-54..I think i have these correct, but not sure as the errors page comes up before it gets this far.

Have read lots of posts but no wiser, help please.
Thanks
Doug :)
Attachments:
More
17 Jan 2016 02:28 #68553 by cmorley
cmorley replied the topic: command format problem
Need to see the error messages
More
17 Jan 2016 02:39 #68554 by wl888
wl888 replied the topic: command format problem
Error message attached
this is the same as it was before i filled out the command lines, as mentioned above.
Thanks
Doug
Attachments:
More
17 Jan 2016 03:06 #68557 by cmorley
cmorley replied the topic: command format problem
So here are some clues:

HAL: ERROR: duplicate component name 'classicladder'
custom_postgui.hal:28: Pin 'motion.in-position' was already linked to signal 'in_pos'


looks like you have tried to load classicladder twice.
Probably once in the main HAL file and once again in the custom_postgui.hal file.

looks like you have tried to link a signal to a 'driving' pins more then once (line 28) - it is already linked to in_pos.
rather then make a new signal name just change the other pins to connect to in_pos

Chris M
More
17 Jan 2016 03:45 #68559 by wl888
wl888 replied the topic: command format problem
Thanks for the quick reply Chris

Sorry ..totally lost me on the first one, what am i looking for, so i can check.

Is this what you mean for part 2.
#23
#Laser offset setup
# set to mdi mode
#net mode halui.mode.is-mdi => classicladder.0.in-04
# wait for motion to finish
net in_pos motion.in-position => classicladder.0.in-04
net in_pos motion.in-position => classicladder.0.in-05
net in_pos motion.in-position => classicladder.0.in-06
net in_pos motion.in-position => classicladder.0.in-07
#32
thanks
doug
More
17 Jan 2016 03:50 #68560 by wl888
wl888 replied the topic: command format problem
there is a :loadrt classicladderrt and a user classicladder in the .hal file but i dont see a duplicate in the custom_postgui
More
17 Jan 2016 04:08 #68562 by wl888
wl888 replied the topic: command format problem
.Hal file
Attachments:
More
17 Jan 2016 05:29 #68565 by cmorley
cmorley replied the topic: command format problem

wl888 wrote: Thanks for the quick reply Chris

Sorry ..totally lost me on the first one, what am i looking for, so i can check.

Is this what you mean for part 2.
#23
#Laser offset setup
# set to mdi mode
#net mode halui.mode.is-mdi => classicladder.0.in-04
# wait for motion to finish
net in_pos motion.in-position => classicladder.0.in-04
net in_pos motion.in-position => classicladder.0.in-05
net in_pos motion.in-position => classicladder.0.in-06
net in_pos motion.in-position => classicladder.0.in-07
#32
thanks
doug


not quite
# wait for motion to finish
net in_pos => classicladder.0.in-04
net in_pos  => classicladder.0.in-05
net in_pos  => classicladder.0.in-06
net in_pos  => classicladder.0.in-07

The classicladder error may be a red herring you will know if it errors again

Chris M
More
17 Jan 2016 05:32 #68566 by cmorley
cmorley replied the topic: command format problem
the fact you have in_pos sent to classicladder multiple times seems wrong all by it's self.
You should be able to use the one input for all the logic that requires it.

Chris M
More
17 Jan 2016 05:35 #68567 by wl888
wl888 replied the topic: command format problem
so the variable in_pos can connect to all the rungs...will try that and see what happens.
would not have come up with that.
thanks
Doug
Time to create page: 0.085 seconds
Powered by Kunena Forum