hostmot2 oneshot bitfile help
09 Dec 2022 18:31 #259028
by roland
hostmot2 oneshot bitfile help was created by roland
I would like to use hostmot2 oneshot.
linuxcnc.org/docs/2.9/html/man/man9/hostmot2.9.html#oneshot
To build the bitfile I have to edit my *.vhd file.
But I don't know how to modify the file for oneshot.
My configuration consists of 7i92 + 7i76 + 7i85S
One smart-serial on the 7i76 and the encoder on the 7i76 are not needed.
Attached is my existing .vhd file
linuxcnc.org/docs/2.9/html/man/man9/hostmot2.9.html#oneshot
To build the bitfile I have to edit my *.vhd file.
But I don't know how to modify the file for oneshot.
My configuration consists of 7i92 + 7i76 + 7i85S
One smart-serial on the 7i76 and the encoder on the 7i76 are not needed.
Attached is my existing .vhd file
Attachments:
Please Log in or Create an account to join the conversation.
09 Dec 2022 18:45 #259031
by PCW
Replied by PCW on topic hostmot2 oneshot bitfile help
The Oneshot module has an input (trigger) and two output pins
what pins do you need (0 to 3) and where do they go?
what pins do you need (0 to 3) and where do they go?
Please Log in or Create an account to join the conversation.
09 Dec 2022 19:02 #259033
by roland
Replied by roland on topic hostmot2 oneshot bitfile help
I am detecting very short signals from a laser light barrier.
For this I need one hardware input (trigger).
The signal should then be linked with probe-in.
The use of hardware output pins is not planned.
So actually the one input is enough for me.
For this I need one hardware input (trigger).
The signal should then be linked with probe-in.
The use of hardware output pins is not planned.
So actually the one input is enough for me.
Please Log in or Create an account to join the conversation.
09 Dec 2022 19:11 - 09 Dec 2022 19:12 #259035
by PCW
Replied by PCW on topic hostmot2 oneshot bitfile help
Here's my test pinout (for a 7I96S) You should be able to copy/paste from it
I forgot that the oneshot can actually have up to 4 pins (2 inputs and 2 outputs)
I forgot that the oneshot can actually have up to 4 pins (2 inputs and 2 outputs)
Attachments:
Last edit: 09 Dec 2022 19:12 by PCW.
The following user(s) said Thank You: roland
Please Log in or Create an account to join the conversation.
09 Dec 2022 19:49 #259040
by roland
Replied by roland on topic hostmot2 oneshot bitfile help
Process "Generate Programming File" completed successfully
I look forward to test this on the machine in the next few days.
Thanks for your support
I look forward to test this on the machine in the next few days.
Thanks for your support
Please Log in or Create an account to join the conversation.
10 Dec 2022 10:21 - 10 Dec 2022 10:25 #259069
by roland
Replied by roland on topic hostmot2 oneshot bitfile help
I have flashed the 7i92.
mesaflash shows the oneshot pins:
I added the oneshot in hal:
But LinuxCNC does not create the oneshop pins
I'm on latest buildbot master LINUXCNC - 2.10.0-pre0-272-g10db23f49
Any ideas?
mesaflash shows the oneshot pins:
mesaflash --readhmid --device 7i92 --addr 10.10.10.10
Configuration Name: HOSTMOT2
General configuration information:
BoardName : MESA7I92
FPGA Size: 9 KGates
FPGA Pins: 144
Number of IO Ports: 2
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 2 of IOPort in configuration
Version: 0
Registers: 5
BaseAddress: 1000
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: OneShot
There are 1 of OneShot in configuration
Version: 0
Registers: 6
BaseAddress: B100
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: MuxedQCount
There are 6 of MuxedQCount in configuration
Version: 4
Registers: 5
BaseAddress: 3600
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: MuxedQCountSel
There are 1 of MuxedQCountSel in configuration
Version: 0
Registers: 0
BaseAddress: 0000
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: StepGen
There are 6 of StepGen in configuration
Version: 2
Registers: 10
BaseAddress: 2000
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: RCPWM
There are 1 of RCPWM in configuration
Version: 0
Registers: 2
BaseAddress: 9D00
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 P2
DB25 pin# I/O Pri. func Sec. func Chan Sec. Pin func Sec. Pin Dir
1 0 IOPort StepGen 4 Dir/Table2 (Out)
14 1 IOPort StepGen 4 Step/Table1 (Out)
2 2 IOPort StepGen 5 Dir/Table2 (Out)
15 3 IOPort StepGen 5 Step/Table1 (Out)
3 4 IOPort OneShot 0 Out1 (Out)
16 5 IOPort OneShot 0 Out2 (Out)
4 6 IOPort None
17 7 IOPort RCPWM 0 PWM (Out)
5 8 IOPort None
6 9 IOPort None
7 10 IOPort SSerial 0 TXData0 (Out)
8 11 IOPort SSerial 0 RXData0 (In)
9 12 IOPort SSerial 0 TXData1 (Out)
10 13 IOPort SSerial 0 RXData1 (In)
11 14 IOPort None
12 15 IOPort OneShot 0 Trigger1 (In)
13 16 IOPort OneShot 0 Trigger2 (In)
IO Connections for P1
DB25 pin# I/O Pri. func Sec. func Chan Sec. Pin func Sec. Pin Dir
1 17 IOPort SSerial 0 RXData2 (In)
14 18 IOPort SSerial 0 TXData2 (Out)
2 19 IOPort StepGen 3 Step/Table1 (Out)
15 20 IOPort StepGen 3 Dir/Table2 (Out)
3 21 IOPort StepGen 2 Step/Table1 (Out)
16 22 IOPort StepGen 2 Dir/Table2 (Out)
4 23 IOPort StepGen 1 Step/Table1 (Out)
17 24 IOPort StepGen 1 Dir/Table2 (Out)
5 25 IOPort StepGen 0 Step/Table1 (Out)
6 26 IOPort StepGen 0 Dir/Table2 (Out)
7 27 IOPort MuxedQCountSel 0 MuxSel0 (Out)
8 28 IOPort MuxedQCount 0 MuxQ-A (In)
9 29 IOPort MuxedQCount 0 MuxQ-B (In)
10 30 IOPort MuxedQCount 0 MuxQ-IDX (In)
11 31 IOPort MuxedQCount 1 MuxQ-A (In)
12 32 IOPort MuxedQCount 1 MuxQ-B (In)
13 33 IOPort MuxedQCount 1 MuxQ-IDX (In)
I added the oneshot in hal:
loadrt hm2_eth board_ip="10.10.10.10" config=" num_oneshots=1 num_encoders=4 num_rcpwmgens=1 num_stepgens=6 sserial_port_0=2120xx"
But LinuxCNC does not create the oneshop pins
LINUXCNC - 2.10.0-pre0-272-g10db23f49
Machine configuration directory is '/home/chef/linuxcnc/configs/005-ENC_01'
Machine configuration file is '005.ini'
Starting LinuxCNC...
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Note: Using POSIX realtime
Found file(REL): ./main.hal
identityKinematicsSetup: coordinates:XYYZVW
Joint 0 ==> Axis X
Joint 1 ==> Axis Y
Joint 2 ==> Axis Y
Joint 3 ==> Axis Z
Joint 4 ==> Axis V
Joint 5 ==> Axis W
hm2: loading Mesa HostMot2 driver version 0.15
hm2_eth: loading Mesa AnyIO HostMot2 ethernet driver version 0.2
hm2_eth: 10.10.10.10: INFO: Hardware address (MAC): 00:60:1b:12:02:48
hm2_eth: discovered 7I92
hm2/hm2_7i92.0: Low Level init 0.15
hm2/hm2_7i92.0: Smart Serial Firmware Version 43
Board hm2_7i92.0.7i76.0.0 Hardware Mode 0 = standard
Board hm2_7i92.0.7i76.0.0 Software Mode 0 = io_spin
Board hm2_7i92.0.7i76.0.0 Software Mode 1 = io_ana_spin
Board hm2_7i92.0.7i76.0.0 Software Mode 2 = io_enc_ana_spin_fv
Board hm2_7i92.0.7i84.0.2 Hardware Mode 0 = standard
Board hm2_7i92.0.7i84.0.2 Software Mode 0 = input_output
Board hm2_7i92.0.7i84.0.2 Software Mode 1 = io_analog_fieldvoltage
Board hm2_7i92.0.7i84.0.2 Software Mode 2 = io_encoder_analog
Waiting for component 'hm2_eth' to become ready..hm2/hm2_7i92.0: 34 I/O Pins used:
hm2/hm2_7i92.0: IO Pin 000 (P2-01): StepGen #4, pin Direction (Output)
hm2/hm2_7i92.0: IO Pin 001 (P2-14): StepGen #4, pin Step (Output)
hm2/hm2_7i92.0: IO Pin 002 (P2-02): StepGen #5, pin Direction (Output)
hm2/hm2_7i92.0: IO Pin 003 (P2-15): StepGen #5, pin Step (Output)
hm2/hm2_7i92.0: IO Pin 004 (P2-03): IOPort
hm2/hm2_7i92.0: IO Pin 005 (P2-16): IOPort
hm2/hm2_7i92.0: IO Pin 006 (P2-04): IOPort
hm2/hm2_7i92.0: IO Pin 007 (P2-17): RCPWMGen #0, pin PWM (Output)
hm2/hm2_7i92.0: IO Pin 008 (P2-05): IOPort
hm2/hm2_7i92.0: IO Pin 009 (P2-06): IOPort
hm2/hm2_7i92.0: IO Pin 010 (P2-07): Smart Serial Interface #0, pin tx0 (Output)
hm2/hm2_7i92.0: IO Pin 011 (P2-08): Smart Serial Interface #0, pin rx0 (Input)
hm2/hm2_7i92.0: IO Pin 012 (P2-09): IOPort
hm2/hm2_7i92.0: IO Pin 013 (P2-10): IOPort
hm2/hm2_7i92.0: IO Pin 014 (P2-11): IOPort
hm2/hm2_7i92.0: IO Pin 015 (P2-12): IOPort
hm2/hm2_7i92.0: IO Pin 016 (P2-13): IOPort
hm2/hm2_7i92.0: IO Pin 017 (P1-01): Smart Serial Interface #0, pin rx2 (Input)
hm2/hm2_7i92.0: IO Pin 018 (P1-14): Smart Serial Interface #0, pin tx2 (Output)
hm2/hm2_7i92.0: IO Pin 019 (P1-02): StepGen #3, pin Step (Output)
hm2/hm2_7i92.0: IO Pin 020 (P1-15): StepGen #3, pin Direction (Output)
hm2/hm2_7i92.0: IO Pin 021 (P1-03): StepGen #2, pin Step (Output)
hm2/hm2_7i92.0: IO Pin 022 (P1-16): StepGen #2, pin Direction (Output)
hm2/hm2_7i92.0: IO Pin 023 (P1-04): StepGen #1, pin Step (Output)
hm2/hm2_7i92.0: IO Pin 024 (P1-17): StepGen #1, pin Direction (Output)
hm2/hm2_7i92.0: IO Pin 025 (P1-05): StepGen #0, pin Step (Output)
hm2/hm2_7i92.0: IO Pin 026 (P1-06): StepGen #0, pin Direction (Output)
hm2/hm2_7i92.0: IO Pin 027 (P1-07): Muxed Encoder Select #0, pin Mux Select 0 (Output)
hm2/hm2_7i92.0: IO Pin 028 (P1-08): Muxed Encoder #0, pin Muxed A (Input)
hm2/hm2_7i92.0: IO Pin 029 (P1-09): Muxed Encoder #0, pin Muxed B (Input)
hm2/hm2_7i92.0: IO Pin 030 (P1-10): Muxed Encoder #0, pin Muxed Index (Input)
hm2/hm2_7i92.0: IO Pin 031 (P1-11): Muxed Encoder #1, pin Muxed A (Input)
hm2/hm2_7i92.0: IO Pin 032 (P1-12): Muxed Encoder #1, pin Muxed B (Input)
hm2/hm2_7i92.0: IO Pin 033 (P1-13): Muxed Encoder #1, pin Muxed Index (Input)
hm2/hm2_7i92.0: registered
.
inifile: warning: File contains DOS-style line endings.
Found file(REL): ./custom.hal
Found file(REL): ./panel.hal
./panel.hal:1: Warning: File contains DOS-style line endings.
note: MAXV max: 282.000 units/sec 16920.000 units/min
note: LJOG max: 282.000 units/sec 16920.000 units/min
note: LJOG default: 50.000 units/sec 3000.000 units/min
Warnung: Die Vorwärtskinematik muss mit doppelten Koordinatenbuchstaben umgehen:yy
note: jog_order='XYZVW'
note: jog_invert=set()
I'm on latest buildbot master LINUXCNC - 2.10.0-pre0-272-g10db23f49
Any ideas?
Last edit: 10 Dec 2022 10:25 by roland.
Please Log in or Create an account to join the conversation.
10 Dec 2022 16:21 #259102
by PCW
Replied by PCW on topic hostmot2 oneshot bitfile help
what does mesaflash --readhmid show?
Please Log in or Create an account to join the conversation.
10 Dec 2022 16:43 #259106
by roland
Replied by roland on topic hostmot2 oneshot bitfile help
mesaflash --readhmid output see at the beginning of the previous post
Output seem okay for me
or this attached file:
Output seem okay for me
or this attached file:
Attachments:
Please Log in or Create an account to join the conversation.
10 Dec 2022 17:21 #259112
by PCW
Replied by PCW on topic hostmot2 oneshot bitfile help
Look like there's a bug in the command line parsing
Try without the num_oneshots stanza in the command line
Try without the num_oneshots stanza in the command line
The following user(s) said Thank You: roland
Please Log in or Create an account to join the conversation.
10 Dec 2022 17:37 #259114
by roland
Replied by roland on topic hostmot2 oneshot bitfile help
Attachments:
Please Log in or Create an account to join the conversation.
Time to create page: 0.104 seconds