- Posts: 1850
- Thank you received: 0
1 of 3 to output // 7i73 MPG not functioning
9 years 1 month ago #98876
by tecno
Replied by tecno on topic 1 of 3 to output
Please Log in to join the conversation.
9 years 1 month ago #98877
by rodw
Replied by rodw on topic 1 of 3 to output
I tink your answer lies here
linuxcnc.org/docs/html/man/man9/logic.9.html
There is also an example in my HAL of a flashing light Todd wrote which is also documented in my build thread. I seem to remember that siggen outputs a float and you need a bit to trigger an output. There is no float to bit conversion so you need to convert the float to s32 and then convert from s32 to bit. A siggen squarewave should alternate from 0 to 1 in this way.
There is also an example in my HAL of a flashing light Todd wrote which is also documented in my build thread. I seem to remember that siggen outputs a float and you need a bit to trigger an output. There is no float to bit conversion so you need to convert the float to s32 and then convert from s32 to bit. A siggen squarewave should alternate from 0 to 1 in this way.
Please Log in to join the conversation.
9 years 1 month ago #98935
by andypugh
Replied by andypugh on topic 1 of 3 to output
For a flashing light with logic to enable it I would suggest making one flasher (siggen) and passing it to as mNY LUT5 components as needed. LUT5 is very powerful if rather hard to grasp. It can define an output for any possible set of 5 inputs (and when one input is a flasher, 4 other inputs)
I suggest looking at the lut5 manage and reporting back whether you can follow it.
I suggest looking at the lut5 manage and reporting back whether you can follow it.
Please Log in to join the conversation.
9 years 1 month ago #98936
by tecno
Replied by tecno on topic 1 of 3 to output
Will certainly have a look at LUT5 but first I need to get MPG+switches working.
Hopefully Peter will chime in here and have a look why the PNCCONF generated code 7i73 related MPG is not working.
Hopefully Peter will chime in here and have a look why the PNCCONF generated code 7i73 related MPG is not working.
Please Log in to join the conversation.
9 years 1 month ago #98939
by tecno
Replied by tecno on topic 1 of 3 to output
Here my latest HAL and INI
Switches verified working OK, MPG Counts.
So something is missing.
Attachment not found
Attachment not found
Switches verified working OK, MPG Counts.
So something is missing.
Please Log in to join the conversation.
9 years 1 month ago #98942
by rodw
Replied by rodw on topic 1 of 3 to output
My guess is that
means that for each step of the jog wheel you move exactly 0.0 machine units
Code:
sets selected-jog-incr 0.000000
means that for each step of the jog wheel you move exactly 0.0 machine units
Please Log in to join the conversation.
9 years 1 month ago #98943
by tecno
Replied by tecno on topic 1 of 3 to output
Missed that one but still NO GO so something is not activated but what?
Please Log in to join the conversation.
9 years 1 month ago #98944
by rodw
Replied by rodw on topic 1 of 3 to output
So what you are missing is a way to set the jog scale based on your switch position
It seems you are not using a binary coded switch as per this example
linuxcnc.org/docs/html/examples/mpg.html
Personally, I would replace your switch with the correct type and save one pin. Then you can follow the example above. Read it carefully and get to understand it fully, particularly how mux4 works. Follow the example I shared with you on my build thread.
If you follow "the rules" in the examples, life becomes much easier.....
Something like this which worked for me
www.jaycar.com.au/1-pole-sealed-pcb-rotary/p/SR1210
It seems you are not using a binary coded switch as per this example
linuxcnc.org/docs/html/examples/mpg.html
Personally, I would replace your switch with the correct type and save one pin. Then you can follow the example above. Read it carefully and get to understand it fully, particularly how mux4 works. Follow the example I shared with you on my build thread.
If you follow "the rules" in the examples, life becomes much easier.....
Something like this which worked for me
www.jaycar.com.au/1-pole-sealed-pcb-rotary/p/SR1210
Please Log in to join the conversation.
9 years 1 month ago #98945
by tecno
Replied by tecno on topic 1 of 3 to output
This is what is in HAL for X-axis MPG, so what is missing
### MPG increment selector
# --- JOG-INCR-A X1 ---
net jog-incr-a <= hm2_7i76e.0.7i73.0.1.input-00
### MPG axis selector
# --- JOINT-SELECT-A Xaxis ---
net joint-select-a <= hm2_7i76e.0.7i73.0.1.input-06
# ---mpg signals---
# for axis x MPG
setp axis.0.jog-vel-mode 0
net selected-jog-incr => axis.0.jog-scale
net joint-select-a => axis.0.jog-enable
net joint-selected-count => axis.0.jog-counts
sets selected-jog-incr 1.000000
If I understand Peters message there is no need to have software MPG thus the code from PNCCONF should work.
### MPG increment selector
# --- JOG-INCR-A X1 ---
net jog-incr-a <= hm2_7i76e.0.7i73.0.1.input-00
### MPG axis selector
# --- JOINT-SELECT-A Xaxis ---
net joint-select-a <= hm2_7i76e.0.7i73.0.1.input-06
# ---mpg signals---
# for axis x MPG
setp axis.0.jog-vel-mode 0
net selected-jog-incr => axis.0.jog-scale
net joint-select-a => axis.0.jog-enable
net joint-selected-count => axis.0.jog-counts
sets selected-jog-incr 1.000000
If I understand Peters message there is no need to have software MPG thus the code from PNCCONF should work.
Please Log in to join the conversation.
Time to create page: 0.152 seconds
