Lpt bit in G-code
12 Nov 2010 08:12 #5257
by z_nick
Lpt bit in G-code was created by z_nick
Hello, Can You help me?
I need to compare phisical input signal in G-code. How i can do it?
For Example:
G-code
#1 <= -its must be "connected" to parport1.bit1
O101 while [#1=1]
G1 X0 Y100
G1 X100 Y100
O101 endwhile
Thanx.
I need to compare phisical input signal in G-code. How i can do it?
For Example:
G-code
#1 <= -its must be "connected" to parport1.bit1
O101 while [#1=1]
G1 X0 Y100
G1 X100 Y100
O101 endwhile
Thanx.
Please Log in or Create an account to join the conversation.
12 Nov 2010 12:11 #5263
by BigJohnT
Replied by BigJohnT on topic Re:Lpt bit in G-code
Please Log in or Create an account to join the conversation.
12 Nov 2010 13:11 #5264
by z_nick
Replied by z_nick on topic Re:Lpt bit in G-code
Thank You for reply.
Yes M66 can translate signal to #5399 but I need more than 1 signal to transfer.
Task is :
Run separate pieces of code according to Hi-level on the pins.
Yes M66 can translate signal to #5399 but I need more than 1 signal to transfer.
Task is :
Run separate pieces of code according to Hi-level on the pins.
Please Log in or Create an account to join the conversation.
12 Nov 2010 13:54 #5265
by andypugh
Replied by andypugh on topic Re:Lpt bit in G-code
Depending on which way you prefer:
M66 P1
#1 = #5399
M66 P2
#2 = #5399
M66 P3
#3 = #5399
Or, bit-map the result:
M66 P1
#1 = #5399
M66 P2
#1 = [#1 + 2 * #5399]
M66 P3
#1 = [#1 + 4 * #5399]
(etc)
Then build a set of IF statements arouind #1.
M66 P1
#1 = #5399
M66 P2
#2 = #5399
M66 P3
#3 = #5399
Or, bit-map the result:
M66 P1
#1 = #5399
M66 P2
#1 = [#1 + 2 * #5399]
M66 P3
#1 = [#1 + 4 * #5399]
(etc)
Then build a set of IF statements arouind #1.
Please Log in or Create an account to join the conversation.
12 Nov 2010 14:00 - 12 Nov 2010 14:10 #5266
by z_nick
Replied by z_nick on topic Re:Lpt bit in G-code
Thank You for reply.
I miss the P parametr in M66 . I think thats it !!!
May i ask enother question?
How i can "Connect" in HAL lpt bits to M66 P1, P2, e.t.c
Thank You
I miss the P parametr in M66 . I think thats it !!!
May i ask enother question?
How i can "Connect" in HAL lpt bits to M66 P1, P2, e.t.c
Thank You
Last edit: 12 Nov 2010 14:10 by z_nick.
Please Log in or Create an account to join the conversation.
12 Nov 2010 14:18 #5267
by andypugh
Replied by andypugh on topic Re:Lpt bit in G-code
z_nick wrote:
You only have 4 digital inputs by default, you can add more (up to 64 I think) by modifying the motion line in the HAL file using the num_dio parameter
linuxcnc.org/docs/html/man/man9/axis.9.html
You then just need to connect them up to p-port pins in the hal file.
net d1 parport.0.pin-10-in => motion.digital-in.00
net d2 parport.0.pin-11-in => motion.digital-in.01
and so on.
(Start emc from the command line by typing emc, you get to see what you have miss-typed that way)
How i can "Connect" in HAL lpt bits to M66 P1, P2, e.t.c
You only have 4 digital inputs by default, you can add more (up to 64 I think) by modifying the motion line in the HAL file using the num_dio parameter
linuxcnc.org/docs/html/man/man9/axis.9.html
You then just need to connect them up to p-port pins in the hal file.
net d1 parport.0.pin-10-in => motion.digital-in.00
net d2 parport.0.pin-11-in => motion.digital-in.01
and so on.
(Start emc from the command line by typing emc, you get to see what you have miss-typed that way)
Please Log in or Create an account to join the conversation.
12 Nov 2010 14:33 #5268
by z_nick
Replied by z_nick on topic Re:Lpt bit in G-code
Ok. Thank You! Its very helpfull for me.
Please Log in or Create an account to join the conversation.
Time to create page: 0.089 seconds