On Sat, 9 Dec 2017, Gene Heskett wrote:
Date: Sat, 9 Dec 2017 10:31:49 -0500
From: Gene Heskett <[email protected]>
Reply-To: "Enhanced Machine Controller (EMC)"
<[email protected]>
To: [email protected]
Subject: Re: [Emc-users] Wrong polarity of pwm?
On Saturday 09 December 2017 05:59:58 andy pugh wrote:
On 9 December 2017 at 04:06, Gene Heskett <[email protected]> wrote:
So I
tried to invert_output on gpio.001, which ack the above, should have
done it.
Yes, I agree, it should.
So, did it?
No, it cut the amplitude to about a volt, but did not invert it.
What does
halcmd show param *gpio.001*
tell you after the system has launched?
Didn't look. And its not in a condition to be safely powered up until
i complete the reversal at the pulse input to the pwmservo amp. But that
shouldn't need power on anything but the 5i25 for that test.
gene@GO704:~/linuxcnc/configs/GO704fast$ halcmd show param
hm2_5i25.0.gpio.001
Parameters:
Owner Type Dir Value Name
This is with lncnc running, but not power on the box of drivers etc.
However if I run show config, and select the 5i25, I can see this if it
will copy/paste:
12 bit RW FALSE hm2_5i25.0.pwmgen.00.out0.invert_output
12 bit RW FALSE hm2_5i25.0.pwmgen.00.out0.is_opendrain
12 bit RW TRUE hm2_5i25.0.pwmgen.00.out1.invert_output
12 bit RW FALSE hm2_5i25.0.pwmgen.00.out1.is_opendrain
12 s32 RW 1 hm2_5i25.0.pwmgen.00.output-type
12 float RW 46 hm2_5i25.0.pwmgen.00.scale
12 u32 RW 0x00004E20 hm2_5i25.0.pwmgen.pdm_frequency
12 u32 RW 0x00004E20 hm2_5i25.0.pwmgen.pwm_frequency
However, commenting that line back out of the hal file and rerunning
lncnc, I get this:
12 bit RW FALSE hm2_5i25.0.pwmgen.00.out0.invert_output
12 bit RW FALSE hm2_5i25.0.pwmgen.00.out0.is_opendrain
12 bit RW TRUE hm2_5i25.0.pwmgen.00.out1.invert_output
12 bit RW FALSE hm2_5i25.0.pwmgen.00.out1.is_opendrain
12 s32 RW 1 hm2_5i25.0.pwmgen.00.output-type
12 float RW 46 hm2_5i25.0.pwmgen.00.scale
12 u32 RW 0x00004E20 hm2_5i25.0.pwmgen.pdm_frequency
12 u32 RW 0x00004E20 hm2_5i25.0.pwmgen.pwm_frequency
IOW, no change
So, lets see if this will work instead:
setp hm2_5i25.0.pwmgen.00.out0.invert_output true
No change, I half expected an init error
12 bit RW FALSE hm2_5i25.0.pwmgen.00.out0.invert_output
12 bit RW FALSE hm2_5i25.0.pwmgen.00.out0.is_opendrain
12 bit RW TRUE hm2_5i25.0.pwmgen.00.out1.invert_output
12 bit RW FALSE hm2_5i25.0.pwmgen.00.out1.is_opendrain
12 s32 RW 1 hm2_5i25.0.pwmgen.00.output-type
12 float RW 46 hm2_5i25.0.pwmgen.00.scale
12 u32 RW 0x00004E20 hm2_5i25.0.pwmgen.pdm_frequency
12 u32 RW 0x00004E20 hm2_5i25.0.pwmgen.pwm_frequency
So what this indicates is that you have not been able to set the PWM invert
bit true, This really suggests you have multiple conflicting setp statements
in your hal file. I note that you are using a new enough version of LinuxCNC
that the GPIO pin attribute aliases are available, that is
setp hm2_5i25.0.pwmgen.00.out0.invert_output true
is equivalent to
setp hm2_5i25.0.gpio.001.invert-output true
for the rxfx2 config
so there are even more possibilities of conflicting setp's...
Peter Wallace
Mesa Electronics
(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users