Comment utiliser le signal d'un capteur

More
1 year 6 months ago #326072 by jelost
Bonjour,

J'ai câblé un switch sur le pin d'entrée n° 11 de ma carte d'axes.
Je voudrais exploiter cette entrée dans un programme avec la condition if.

Comment faire pour affecter cette entrée à une variable utilisateur, par exemple 40 ?

La ligne pour cette entrée dans le fichier hal :
net din-01  <= parport.0.pin-11-in
La ligne du programme avec if
o100 if [#40  EQ 1]

Merci d'avance

 

Please Log in to join the conversation.

More
1 year 6 months ago #326125 by Grotius

Please Log in to join the conversation.

More
1 year 6 months ago #326155 by jelost
Hi Grotius,

Thank you very much for your help !!
Now my problem is solved :)

The new line in the hal file :
net signal-name motion.digital-in-01 <= parport.0.pin-11-in

And the lines of my program :
M66 P1 L0
o100 if [#5399 EQ 1]

Please Log in to join the conversation.

Time to create page: 0.073 seconds
Powered by Kunena Forum