1 of 3 to output // 7i73 MPG not functioning

More
12 Sep 2017 10:54 #98876 by tecno
tecno replied the topic: 1 of 3 to output
More
12 Sep 2017 11:19 #98877 by rodw
rodw replied the 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.
More
14 Sep 2017 07:19 #98935 by andypugh
andypugh replied the 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.
More
14 Sep 2017 07:42 #98936 by tecno
tecno replied the 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.
More
14 Sep 2017 12:01 #98939 by tecno
tecno replied the topic: 1 of 3 to output
Here my latest HAL and INI

File Attachment:

File Name: combimillx...9-14.ini
File Size:5 KB

File Attachment:

File Name: combimillx...9-14.hal
File Size:19 KB


Switches verified working OK, MPG Counts.

So something is missing.
Attachments:
More
14 Sep 2017 12:33 #98942 by rodw
rodw replied the topic: 1 of 3 to output
My guess is that
sets selected-jog-incr     0.000000

means that for each step of the jog wheel you move exactly 0.0 machine units
More
14 Sep 2017 12:45 #98943 by tecno
tecno replied the topic: 1 of 3 to output
Missed that one but still NO GO so something is not activated but what?
More
14 Sep 2017 12:46 #98944 by rodw
rodw replied the 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
More
14 Sep 2017 12:58 #98945 by tecno
tecno replied the 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.
More
14 Sep 2017 15:37 #98952 by tecno
tecno replied the topic: 1 of 3 to output
Hmmm, I have found an orphan

loadrt mux16 names=jogincr

So something is missing here
Time to create page: 0.088 seconds
Powered by Kunena Forum