Preparation for the self-construction of a carousel changer

More
03 Nov 2022 23:30 #255877 by andypugh

loadrt hm2_eth board_ip="10.10.10.10" config=" num_encoders=1 num_pwmgens=0 num_stepgens=5 sserial_port_0=20xxxx"

I think I need to change num_pwmgens=0   to   num_pwmgens=1   right?
 



Yes. Try that with the current firmware, in fact just delete that num_pwmgens=0 and it will enable all of them (if there are any)

 

Please Log in or Create an account to join the conversation.

More
04 Nov 2022 12:52 #255908 by mgm
For each bit file there is also a pin file or?
Unfortunately I can't find the pin file for the bit file "7i76e_7i76x1p2d.bit". It is not in the zip file at mesa!

I would like to have a look before I write the file.

If I write the file will all my current assignments be preserved or do I have to change something afterwards?

Because the machine is already in use!

Please Log in or Create an account to join the conversation.

More
04 Nov 2022 13:37 - 04 Nov 2022 13:38 #255912 by andypugh
The pin file (PIN_7i76x1P2D_51.vhd) is in the zip file that I have, but if you are using all 5 stepgens that is no use to you anyway:
IOPortTag & x"00" & StepGenTag & StepGenDirPin, -- I/O 00 embedded 7I76
IOPortTag & x"00" & StepGenTag & StepGenStepPin, -- I/O 01
IOPortTag & x"01" & StepGenTag & StepGenDirPin, -- I/O 02
IOPortTag & x"01" & StepGenTag & StepGenStepPin, -- I/O 03
IOPortTag & x"02" & StepGenTag & StepGenDirPin, -- I/O 04
IOPortTag & x"02" & StepGenTag & StepGenStepPin, -- I/O 05
IOPortTag & x"03" & StepGenTag & StepGenDirPin, -- I/O 06
IOPortTag & x"03" & StepGenTag & StepGenStepPin, -- I/O 07
IOPortTag & x"01" & PWMTag & PWMAOutPin, -- I/O 08
IOPortTag & x"00" & PWMTag & PWMAOutPin, -- I/O 09
IOPortTag & x"00" & SSerialTag & SSerialTX0Pin, -- I/O 10
IOPortTag & x"00" & SSerialTag & SSerialRX0Pin, -- I/O 11
IOPortTag & x"00" & SSerialTag & SSerialTX1Pin, -- I/O 12
IOPortTag & x"00" & SSerialTag & SSerialRX1Pin, -- I/O 13
IOPortTag & x"00" & QCountTag & x"03", -- I/O 14
IOPortTag & x"00" & QCountTag & x"02", -- I/O 15
IOPortTag & x"00" & QCountTag & x"01", -- I/O 16

Start LinuxCNC from the command-line without num_pwmgens=0 and see what you have already. That's going to be least dangerous option id there are pwms on the expansion ports.
Last edit: 04 Nov 2022 13:38 by andypugh.

Please Log in or Create an account to join the conversation.

More
04 Nov 2022 15:04 - 04 Nov 2022 15:05 #255918 by mgm
Ok I now removed num_pwmgens from hal and started linuxcnc in terminal and then got the following:
 

File Attachment:

File Name: expansionspins.txt
File Size:4 KB


OK there are no PWMgens available and now?

Where do I get some? and how does the 7i74 help?



 
Attachments:
Last edit: 04 Nov 2022 15:05 by mgm.

Please Log in or Create an account to join the conversation.

More
04 Nov 2022 16:07 #255931 by andypugh
So, you need to find a suitable firmware which matches the 7i76 on P1 but has PWM on P2.
The 7i74 will plug into the P2 (or P3) connector and protect the bare FPGA pins from static, undervoltage, overvoltage etc. And provide screw terminals for the wires.

Please Log in or Create an account to join the conversation.

More
12 Nov 2022 18:17 #256516 by mgm
small update:
i now have pwmgens on the extension P1 and the 7i74 connected

What I use for a bitfile is in this topic:
forum.linuxcnc.org/27-driver-boards/47310-mesa-7i76ed-extension

Must now find out what all I need to control via pwm in the hal and how to connect it to the driver!

Please Log in or Create an account to join the conversation.

More
14 Nov 2022 11:51 - 16 Nov 2022 14:04 #256679 by mgm
Could someone please look if this is correct?
connection from BLDC to 7i75 or to P1 of 7i76e 
 

This browser does not support PDFs. Please download the PDF to view it: Download PDF


 

This browser does not support PDFs. Please download the PDF to view it: Download PDF



to use the PWM I add the following lines to my hal?

loadrt pwmgen output_type=0
addf pwmgen.update servo-thread
addf pwmgen.make-pulses base-thread

setp pwmgen.0.pwm-freg 1000.0
setp pwmgen.0.scale xxx


is there anything missing except the assignment to the PWM output? 
These half entries are for the software PWM!
For me these are not necessary ...

 
Attachments:
Last edit: 16 Nov 2022 14:04 by mgm.

Please Log in or Create an account to join the conversation.

More
16 Nov 2022 00:09 #256819 by andypugh
Try it. Worst case it just won't work.

Please Log in or Create an account to join the conversation.

More
16 Nov 2022 14:07 #256861 by mgm
it works !

The PWM connection from the 7i75 to the BLDC 8015A is as follows:
Pin 7i75 Pin BLDC
PWM / IO0 to AVI
     G to GND

I need these entries in the hal:
setp hm2_7i76e.pwmgen.00.pwm_frequency 1000
setp hm2_7i76e.pwmgen.00.value 0.025
setp hm2_7i76e.pwmgen.00.enable true

I switch the motor on and off via the enabl pin at the BLDC 8015A therefore pwmgen.00.enable true!

Please Log in or Create an account to join the conversation.

More
29 Nov 2022 13:10 - 29 Nov 2022 13:29 #257969 by mgm
So I am currently busy with the carousel.comp , unfortunately I am in the meantime only despair ......

The description says:
"When the enable pin is set to true the component will immediately set the "active" pin to true"
and this does not happen with me, why? what have I forgotten ...


I have collected the following hal-components:
loadrt carousel pockets=12 dir=1 encoding=BCD num_sense=4
loadrt conv_float_s32  
 
addf carousel.0  servo-thrad
addf conv-float-s32.0    servo-thread

setp carousel.0.fwd-dc 0.025
setp carousel.0.rev-dc 0.025

net car-enable      motion.digital-out-10       carousel.0.enable     
net car-pos-req    motion.analog-out-00      conv-float-s32.0.in   
net car-pos-s32    conv-float-s32.0.out        carousel.0.pocket-number

net bit0 carousel.0.sense-0    hm2_7i76e.0.7i84.0.1.input-19-not
net bit1 carousel.0.sense-1    hm2_7i76e.0.7i84.0.1.input-20-not
net bit2 carousel.0.sense-2    hm2_7i76e.0.7i84.0.1.input-21-not
net bit3 carousel.0.sense-3    hm2_7i76e.0.7i84.0.1.input-23-not

net car_rad  carousel.0.strobe   <=  hm2_7i76e.0.7i84.0.1.input-22-not

net T-loop        iocontrol.0.tool-prepare          => iocontrol.0.tool-prepared
net tool-change-loop   iocontrol.0.tool-change    iocontrol.0.tool-changed


I proceed as follows:
For test purposes
- I set the pocket-number in MIDI via M68 P0 Qxx
- then I set the enabel pin with M64 P10

but the activ pin is not true .....

 
Last edit: 29 Nov 2022 13:29 by mgm.

Please Log in or Create an account to join the conversation.

Time to create page: 0.386 seconds
Powered by Kunena Forum