command format problem

More
16 Jan 2016 23:09 #68542 by wl888
command format problem was created by wl888
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:

Please Log in or Create an account to join the conversation.

More
17 Jan 2016 02:28 #68553 by cmorley
Replied by cmorley on topic command format problem
Need to see the error messages

Please Log in or Create an account to join the conversation.

More
17 Jan 2016 02:39 #68554 by wl888
Replied by wl888 on 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:

Please Log in or Create an account to join the conversation.

More
17 Jan 2016 03:06 #68557 by cmorley
Replied by cmorley on 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

Please Log in or Create an account to join the conversation.

More
17 Jan 2016 03:45 #68559 by wl888
Replied by wl888 on 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

Please Log in or Create an account to join the conversation.

More
17 Jan 2016 03:50 #68560 by wl888
Replied by wl888 on 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

Please Log in or Create an account to join the conversation.

More
17 Jan 2016 04:08 #68562 by wl888
Replied by wl888 on topic command format problem
.Hal file
Attachments:

Please Log in or Create an account to join the conversation.

More
17 Jan 2016 05:29 #68565 by cmorley
Replied by cmorley on 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


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

Please Log in or Create an account to join the conversation.

More
17 Jan 2016 05:32 #68566 by cmorley
Replied by cmorley on 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

Please Log in or Create an account to join the conversation.

More
17 Jan 2016 05:35 #68567 by wl888
Replied by wl888 on 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

Please Log in or Create an account to join the conversation.

Time to create page: 0.139 seconds
Powered by Kunena Forum