How to configure axes of new mechanism and create additional intelligent component?

Hello how are you? This time I wanted to consult you for the creation of mechanisms. I created a tool, I have tried to add an additional rotational axis to my solution, but it does not allow me for the axes that are already configured. Now my query is, will it be possible to add it given the above? My idea is that the prismatic execution of the cylinder executes both axes of rotation, or something like that. I leave a video below.

I also need to develop a component, similar to the one that the Vacum tool tool brings in PowerPac, where it uses group input signal and as output it obtains a binary (1 or 0), but more simplified. I can not even think how to do it. Any ideas?. I attached image.