request information on how to use correctly or2 function
19 Jul 2021 08:41 #215294
by sibelius
request information on how to use correctly or2 function was created by sibelius
Hello everyone,
While I was thinking at my Emergency stop hal code, I realize, looking at my hal file, that I did something wrong and incomplete.
The problem is focused on my tool setter that it has a circuit for an over travel safety to avoid crashing it.
So in my understanding this loop can be hooked with an existing signal used for example for an end switch and this is my goal.
This underneath is the hal code that links the virtual circuit to trigger the Z end switch and in this case acting also as a Z home switch.The code above does the job correctly as expected.
Now I create the following signal for the over travel safety loop on pin 13Now what I would like to do is to create a signal that basically when the tool trying to crash the tool setter it act like if the Z switch was trigged.
Basically I need to write a piece of code with an or2.0 function that gets two inputs in and one output accordingly with the or2.0 truth table.
So that's my hal code
Any help would be great.
Another question that comes to my mind is: the pin 06 need to be unlinked if I use it into an or2.0 function?
I am a bit confuse all along the way.
Thanks.
V.
While I was thinking at my Emergency stop hal code, I realize, looking at my hal file, that I did something wrong and incomplete.
The problem is focused on my tool setter that it has a circuit for an over travel safety to avoid crashing it.
So in my understanding this loop can be hooked with an existing signal used for example for an end switch and this is my goal.
This underneath is the hal code that links the virtual circuit to trigger the Z end switch and in this case acting also as a Z home switch.
#net both-home-z <= hm2_7i76e.0.7i76.0.0.input-06-not
#net both-home-z => joint.3.home-sw-in
#net both-home-z => joint.3.neg-lim-sw-in
#net both-home-z => joint.3.pos-lim-sw-in
Now I create the following signal for the over travel safety loop on pin 13
net over-travel <= hm2_7i76e.0.7i76.0.0.input-13-not
Basically I need to write a piece of code with an or2.0 function that gets two inputs in and one output accordingly with the or2.0 truth table.
So that's my hal code
loadrt or2
addf or2.0 servo-thread
net signal-a or2.0.in0 <= hm2_7i76e.0.7i76.0.0.input-06-not
net signal-b or2.0.in1 <= hm2_7i76e.0.7i76.0.0.input-13-not
net a-or-b <= or2.0.out
Any help would be great.
Another question that comes to my mind is: the pin 06 need to be unlinked if I use it into an or2.0 function?
I am a bit confuse all along the way.
Thanks.
V.
Please Log in or Create an account to join the conversation.
19 Jul 2021 10:03 #215304
by Aciera
Replied by Aciera on topic request information on how to use correctly or2 function
Looks ok to me.want you want to reuse 'hm2_7i76e.0.7i76.0.0.input-06-not'
Then you would use the signal 'both-home-z':
An output can only be connected to one signal. So if you have thisAnother question that comes to my mind is: the pin 06 need to be unlinked if I use it into an or2.0 function?
net both-home-z <= hm2_7i76e.0.7i76.0.0.input-06-not
Then you would use the signal 'both-home-z':
net both-home-z or2.0.in0
The following user(s) said Thank You: Sadmeatball, sibelius
Please Log in or Create an account to join the conversation.
19 Jul 2021 10:53 #215311
by sibelius
Replied by sibelius on topic request information on how to use correctly or2 function
Hi Aciera, thanks for your answer,
I think I understood, make sense what you are saying.
So basically I could writeinstead of and instead of .
I need to think a bit more, I am extremely slow when it comes to figure out something.
Thanks again
ciao
I think I understood, make sense what you are saying.
So basically I could write
both-home-z
signal-a
over-travel
signal-b
I need to think a bit more, I am extremely slow when it comes to figure out something.
Thanks again
ciao
Please Log in or Create an account to join the conversation.
Time to create page: 0.073 seconds