Pimping the mini-lathe

More
6 years 3 months ago #175881 by tommylight
Replied by tommylight on topic Pimping the mini-lathe
Pin5 only.
Pin 6 is direction and your board does not use that.
Gnd goes from Mesa gnd to pwm board gnd.

Please Log in to join the conversation.

More
6 years 3 months ago #175882 by RotarySMP
Replied by RotarySMP on topic Pimping the mini-lathe
Thanks Tommy.

The 7i96 is connected with ethernet, flashed with 7i96d_1pwm and communicating normally with Linux. P3 is powered with 5V. With LinuxCNC running, I used HALShow to:
Code:
setp hm2_7i96.0.pwmgen.00.enable true
and
Code:
setp hm2_7i96.0.pwmgen.00.value 50

According to the manual TB1-1 would normally be a ground. but according to MESA Flash readhmid, it is now the Step signal for Stepgen 0. Where do you find a GND once you use a non-standard bitfile?
Using my Osci, I cant see a 50% square wave (or any other signal) between TB1-1 and TB1-5

Also is it normal that the Mesaflash readhmid shows nothing on TB2 or TB3? Shouldn't all the generic I/O pins still show up? The read out from Mesaflash readhmid is very different to the one you posted for 7i96d_1pwm.
***edit***
I also just noticed that this readhmid readout shows only single ended connections for the encoder, whereas there should be pairs for differential connection.

Please Log in to join the conversation.

More
6 years 3 months ago #175883 by RotarySMP
Replied by RotarySMP on topic Pimping the mini-lathe
The ICSTATION PWM-analog board I am using only accepts PWM signals between 1kHz and 3kHz. What is the PWM frequency which the 7i96 ouputs?

+++edit+++
Found this:
forum.linuxcnc.org/39-pncconf/38723-pncc...tting-up-pwm-on-7i96

Please Log in to join the conversation.

More
6 years 3 months ago #175888 by tommylight
Replied by tommylight on topic Pimping the mini-lathe
Your Mesa pinout shows "transformer" and that is something i have not seen before !
From what i gather, the PWM output should be on the STEP4 header, so there is the GND and the PWM.
So TB2, pin 1 GND and pin 3 PWM+ should go to the pwm board.
The frequency can be set in hal.

Please Log in to join the conversation.

More
6 years 3 months ago #175889 by RotarySMP
Replied by RotarySMP on topic Pimping the mini-lathe
I flashed the 7i96_1pwm bit file last week, and from the video I took it looked like I did the right one, but the result is very different than sample PCW posted here last week.
forum.linuxcnc.org/26-turning/38280-pimp...the?start=140#175545

I think I'll flash it again, and see if it returns a different result.
Mark

Please Log in to join the conversation.

More
6 years 3 months ago #175896 by RotarySMP
Replied by RotarySMP on topic Pimping the mini-lathe
I reflashed it, but no change...
Code:
minilathe@minilathe:~/Downloads/7i96/configs/hostmot2$ dir 7i96_5abob_d.bit 7i96_6enc_d.bit 7i96_7i77d.bit 7i96_7i85sd.bit 7i96d_1pwm.pin 7i96_fallback.bit 7i96_inmd.bit 7i96_pktd.bit 7i96_5abob_d.pin 7i96_6enc_d.pin 7i96_7i78d.bit 7i96_7i85sinmd.bit 7i96d.bit 7i96_fallback.pin 7i96_inmd_dp.bit 7i96_pktd.pin 7i96_5abob_inmd.bit 7i96_7i76d.bit 7i96_7i78d.pin 7i96_7i89d.bit 7i96d.pin 7i96_g540dpl.bit 7i96_inmd_dp.pin source 7i96_5abob_inmd.pin 7i96_7i76d.pin 7i96_7i85d.bit 7i96d_1pwm.bit 7i96dpl.bit 7i96_inm_7i85sd.bit 7i96_inmd.pin minilathe@minilathe:~/Downloads/7i96/configs/hostmot2$ mesaflash --device 7i96 --addr 10.10.10.10 --write 7i96d_1pwm.bit Checking file... OK File type: BIT file Boot sector OK EEPROM sectors to write: 6, max sectors in area: 16 Erasing EEPROM sectors starting from 0x100000... |EEEEEE Programming EEPROM sectors starting from 0x100000... |WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW Board configuration updated successfully. Checking file... OK File type: BIT file Boot sector OK Verifying EEPROM sectors starting from 0x100000... |VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV Board configuration verified successfully. You must power cycle the hardware or use the --reload command to load a new firmware. minilathe@minilathe:~/Downloads/7i96/configs/hostmot2$ mesaflash --device 7i96 --addr 10.10.10.10 --reload minilathe@minilathe:~/Downloads/7i96/configs/hostmot2$ minilathe@minilathe:~/Downloads/7i96/configs/hostmot2$ mesaflash --device 7i96 --addr 10.10.10.10 --readhmid Configuration Name: HOSTMOT2 General configuration information: BoardName : MESA7I96 FPGA Size: 9 KGates FPGA Pins: 144 Number of IO Ports: 3 Width of one I/O port: 17 Clock Low frequency: 100.0000 MHz Clock High frequency: 200.0000 MHz IDROM Type: 3 Instance Stride 0: 4 Instance Stride 1: 64 Register Stride 0: 256 Register Stride 1: 256 Modules in configuration: Module: DPLL There are 1 of DPLL in configuration Version: 0 Registers: 7 BaseAddress: 7000 ClockFrequency: 100.000 MHz Register Stride: 256 bytes Instance Stride: 4 bytes Module: WatchDog There are 1 of WatchDog in configuration Version: 0 Registers: 3 BaseAddress: 0C00 ClockFrequency: 100.000 MHz Register Stride: 256 bytes Instance Stride: 4 bytes Module: IOPort There are 3 of IOPort in configuration Version: 0 Registers: 5 BaseAddress: 1000 ClockFrequency: 100.000 MHz Register Stride: 256 bytes Instance Stride: 4 bytes Module: PWM There are 1 of PWM in configuration Version: 0 Registers: 5 BaseAddress: 4100 ClockFrequency: 200.000 MHz Register Stride: 256 bytes Instance Stride: 4 bytes Module: StepGen There are 4 of StepGen in configuration Version: 2 Registers: 10 BaseAddress: 2000 ClockFrequency: 100.000 MHz Register Stride: 256 bytes Instance Stride: 4 bytes Module: QCount There are 1 of QCount in configuration Version: 2 Registers: 5 BaseAddress: 3000 ClockFrequency: 100.000 MHz Register Stride: 256 bytes Instance Stride: 4 bytes Module: SSerial There are 1 of SSerial in configuration Version: 0 Registers: 6 BaseAddress: 5B00 ClockFrequency: 100.000 MHz Register Stride: 256 bytes Instance Stride: 64 bytes Module: Transformer There are 1 of Transformer in configuration Version: 0 Registers: 2 BaseAddress: 7D00 ClockFrequency: 100.000 MHz Register Stride: 256 bytes Instance Stride: 4 bytes Module: LED There are 1 of LED in configuration Version: 0 Registers: 1 BaseAddress: 0200 ClockFrequency: 100.000 MHz Register Stride: 256 bytes Instance Stride: 4 bytes Configuration pin-out: IO Connections for P1 Pin# I/O Pri. func Sec. func Chan Pin func Pin Dir 1 0 IOPort None 14 1 IOPort None 2 2 IOPort None 15 3 IOPort None 3 4 IOPort None 16 5 IOPort None 4 6 IOPort None 17 7 IOPort None 5 8 IOPort None 6 9 IOPort None 7 10 IOPort None 8 11 IOPort Transformer 0 Drive (Out) 9 12 IOPort Transformer 0 Ref (Out) 10 13 IOPort Transformer 0 Null3 (Out) 11 14 IOPort Transformer 0 Null4 (Out) 12 15 IOPort Transformer 0 Null5 (Out) 13 16 IOPort Transformer 0 Null6 (Out) IO Connections for TB1 Pin# I/O Pri. func Sec. func Chan Pin func Pin Dir 1 17 IOPort StepGen 0 Step/Table1 (Out) 14 18 IOPort StepGen 0 Dir/Table2 (Out) 2 19 IOPort StepGen 1 Step/Table1 (Out) 15 20 IOPort StepGen 1 Dir/Table2 (Out) 3 21 IOPort StepGen 2 Step/Table1 (Out) 16 22 IOPort StepGen 2 Dir/Table2 (Out) 4 23 IOPort StepGen 3 Step/Table1 (Out) 17 24 IOPort StepGen 3 Dir/Table2 (Out) 5 25 IOPort PWM 0 PWM (Out) 6 26 IOPort PWM 0 Dir (Out) 7 27 IOPort QCount 0 Quad-A (In) 8 28 IOPort QCount 0 Quad-B (In) 9 29 IOPort QCount 0 Quad-IDX (In) 10 30 IOPort SSerial 0 RXData1 (In) 11 31 IOPort SSerial 0 TXData1 (Out) 12 32 IOPort SSerial 0 TXEn1 (Out) Segmentation fault (core dumped) minilathe@minilathe:~/Downloads/7i96/configs/hostmot2$

This is from the 7i96.zip file on the MESAnet 7i96 webpage. Could it be that there is a different version of this bitfile I should be using?

Please Log in to join the conversation.

More
6 years 3 months ago #175897 by PCW
Replied by PCW on topic Pimping the mini-lathe
Code:
TB2 2,3 25 IOPort PWM 0 PWM (Out) TB2 4,5 26 IOPort PWM 0 Dir (Out) TB2 7,8 27 IOPort QCount 0 Quad-A (In) TB2 10,11 28 IOPort QCount 0 Quad-B (In) TB2 13,14 29 IOPort QCount 0 Quad-IDX (In)

TB2 pins 2 and 3 are the PWM outputs (- and + respectively)

You need to update mesaflash to get the TB numbers:

github.com/LinuxCNC/mesaflash

Please Log in to join the conversation.

More
6 years 3 months ago #175899 by RotarySMP
Replied by RotarySMP on topic Pimping the mini-lathe
I only just installed mesaflash using the instructions for that github link. What do I need to do differently to get the most current version?

Is there any documentation on the PWM setup? I just found:
Basic PWM setup:
setp hm2_7i96.0.pwmgen.pwm_frequency 10000
setp hm2_7i96.0.pwmgen.00.scale 24000 # full scale is 24000 RPM
setp hm2_7i96.0.pwmgen.00.output-type 1 # standard PWM and direction

And was wondering what the outut type is for only PWM in only one direction? or do I just use this and ignore the direction part?

Please Log in to join the conversation.

More
6 years 3 months ago #175900 by PCW
Replied by PCW on topic Pimping the mini-lathe
It sounds like you did not install the latest mesaflash (so you are using the old one)
after building mesaflash, did you run "sudo make install" ?

git clone github.com/LinuxCNC/mesaflash.git
cd mesaflash
make
sudo make install

And yes standard PWM (mode 1) is correct

Please Log in to join the conversation.

More
6 years 3 months ago #175901 by RotarySMP
Replied by RotarySMP on topic Pimping the mini-lathe
I followed the lines of the git instructions one by one, including make including the four list. When I repeat them

minilathe@minilathe:~$ git clone github.com/LinuxCNC/mesaflash.git
fatal: destination path 'mesaflash' already exists and is not an empty directory.
minilathe@minilathe:~$ cd mesaflash
minilathe@minilathe:~/mesaflash$ make
make: Nothing to be done for 'all'.
minilathe@minilathe:~/mesaflash$ sudo make install
[sudo] password for minilathe:
install -p -D --mode=0755 --owner root --group root mesaflash /bin/mesaflash
install -p -D --mode=0644 --owner root --group root mesaflash.1 /share/man/man1/mesaflash.1
minilathe@minilathe:~/mesaflash$

Please Log in to join the conversation.

Time to create page: 0.131 seconds
Powered by Kunena Forum