How to connect 2 signal

More
3 years 10 months ago #260544 by zz912
Hello,

I want use PNCconf and I dont want change the files generated by PNCconf.

The PNCconf prepared in main *.hal file this:
Code:
net tool-prepare-request    <=  iocontrol.0.tool-prepare net tool-prepare-confirmed  =>  iocontrol.0.tool-prepared

But I need connect this two iocontrol pin.
Now I have to comment it after every modification in PNCconf. It make me mad.

In custom.hal is:
Code:
net tool-prepare-loopback   iocontrol.0.tool-prepare      =>  iocontrol.0.tool-prepared

I would need something like a HAL terminal block.

Please Log in to join the conversation.

More
3 years 10 months ago #260546 by PCW
Replied by PCW on topic How to connect 2 signal
Not sure, but I don't think there is any technical reason that connecting two signals
cannot be done in hal though the signal name binding gets a bit funny since you have
one address with multiple names...

net tool-prepare-loopback tool-prepare-request => tool-prepare-confirmed

The parser would need to know the readers and writers of the signal or some kind of
directionality would need to be included in the syntax:

copy tool-prepare-request => tool-prepare-confirmed

Please Log in to join the conversation.

More
3 years 10 months ago #260646 by zz912
Replied by zz912 on topic How to connect 2 signal

 copy tool-prepare-request => tool-prepare-confirmed

Will this work? Or this is example for new posibly functionality?

I did not find command  "copy" in HAL documentation.

I thought aboat my problem, and I will solve the problem by and2 in custom hal.

setp and2.0.in1 1
net tool-prepare-request     => and2.0.in0
net tool-prepare-confirmed <= and2.0.out
 

Please Log in to join the conversation.

More
3 years 10 months ago #260653 by PCW
Replied by PCW on topic How to connect 2 signal
No, there is no copy command, I was just suggesting a possible syntax to connect signals

Please Log in to join the conversation.

More
3 years 10 months ago #260659 by andypugh
Replied by andypugh on topic How to connect 2 signal
In your custom.hal, which will never be overwritten, add:

Code:
delsig tool-prepare-request delsig tool-prepare-confirmed net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

This deletes the existing two signals(which un-nets the pins) then makes a new connection.

Please Log in to join the conversation.

More
3 years 10 months ago #260663 by zz912
Replied by zz912 on topic How to connect 2 signal
Andy  - this is good solution. Thank you.

Please Log in to join the conversation.

Time to create page: 0.096 seconds
Powered by Kunena Forum