- Hardware & Machines
- Driver Boards
- 7i96S custom bitfile: 4x PktUART V3 on P1 (3x Modbus + 1 full-duplex link) + St
7i96S custom bitfile: 4x PktUART V3 on P1 (3x Modbus + 1 full-duplex link) + St
- MueTho
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 2
- Thank you received: 0
16 Oct 2026 10:16 - 16 Oct 2026 17:43 #350291
by MueTho
7i96S custom bitfile: 4x PktUART V3 on P1 (3x Modbus + 1 full-duplex link) + St was created by MueTho
Hi Peter,
I am building a small 3.5-axis mill/drill with a 7i96S and five STEPPERONLINE A6-RS servo drives (step/dir + Modbus RTU). Current setup: LinuxCNC 2.9.10 uspace on Debian 13 (PREEMPT_RT), 7i96s_pktv3.bin flashed. hm2_modbus to one A6 on TB2 works without errors (115200 8N1, rxdelay 40 / txdelay 45 / icdelay 20, about 7 ms per single-register read at 1 ms servo period).
I would like to ask for a custom bitfile with the following configuration.
TB2 and all on-board I/O: identical to 7i96s_pktv3
- StepGen 0-4 (X, Y, Z, W, spindle), QCount 0 with index (spindle), PktUART V3 on TB2 with internal TXEn, SSR, OutM, InM, PWM unchanged.
P1 (W6 set to GND, a small interface board sits directly at the header):
Notes:
- All PktUARTs V3. No TX enable pins on P1: the three Modbus ports use RS-485 transceivers with automatic direction control (e.g. MAX13487E); the lever link (PktUART 3) is full-duplex RS-422 with the driver permanently enabled, 2-5 Mbit, one packet per servo period in each direction.
- Instance numbering as in the table, please: PktUART 0 stays on TB2 (so existing configs keep working), StepGen 5 and QCount 1 are the highest instances, so I can turn them into GPIO with num_stepgens=5 / num_encoders=1 when they are not needed.
- If it does not all fit into the T20, please drop in this order: QCount 1 first, then PktUART 4, then StepGen 5. PktUARTs 1-3 are the ones I really need.
Questions:
1. Does this fit (5 PktUART V3 in total, 6 StepGens, 2 QCounts)?
2. hm2_modbus without a TX enable pin: is the receiver masked while we transmit (RXMASK driven by the internal drive enable), or should the transceiver's receiver be disabled during TX to avoid the echo?
3. Lever link: for full-duplex use I plan to set the drive enable bit statically and the auto bit off in my own HAL component. Is that the right way with PktUART V3, or would you configure it differently?
4. Is the 7I87 expected to be available again?
If it is easier for you, I can also build it myself with Efinity from the 7i96s sources - in that case a hint which PIN file to start from (PIN_7I96SD_PKTV3?) would be much appreciated.
Thank you very much for your support,
Thorsten
I am building a small 3.5-axis mill/drill with a 7i96S and five STEPPERONLINE A6-RS servo drives (step/dir + Modbus RTU). Current setup: LinuxCNC 2.9.10 uspace on Debian 13 (PREEMPT_RT), 7i96s_pktv3.bin flashed. hm2_modbus to one A6 on TB2 works without errors (115200 8N1, rxdelay 40 / txdelay 45 / icdelay 20, about 7 ms per single-register read at 1 ms servo period).
I would like to ask for a custom bitfile with the following configuration.
TB2 and all on-board I/O: identical to 7i96s_pktv3
- StepGen 0-4 (X, Y, Z, W, spindle), QCount 0 with index (spindle), PktUART V3 on TB2 with internal TXEn, SSR, OutM, InM, PWM unchanged.
P1 (W6 set to GND, a small interface board sits directly at the header):
P1 pin | IO | Function | Instance
-------+------+----------------------------------+-----------
1 | IO34 | StepGen Step | StepGen 5
2 | IO35 | StepGen Dir | StepGen 5
3 | IO36 | GPIO | -
4 | IO37 | QCount A | QCount 1
5 | IO38 | QCount B | QCount 1
6 | IO39 | QCount Index | QCount 1
7 | IO40 | GPIO | -
8 | IO41 | GPIO | -
9 | IO42 | GPIO | -
11 | IO43 | PktUART TX (Modbus, Z drive) | PktUART 1
13 | IO44 | PktUART RX (Modbus, Z drive) | PktUART 1
15 | IO45 | PktUART TX (Modbus, spindle) | PktUART 2
17 | IO46 | PktUART RX (Modbus, spindle) | PktUART 2
19 | IO47 | PktUART TX (lever link) | PktUART 3
21 | IO48 | PktUART RX (lever link) | PktUART 3
23 | IO49 | PktUART TX (Modbus, spare) | PktUART 4
25 | IO50 | PktUART RX (Modbus, spare) | PktUART 4Notes:
- All PktUARTs V3. No TX enable pins on P1: the three Modbus ports use RS-485 transceivers with automatic direction control (e.g. MAX13487E); the lever link (PktUART 3) is full-duplex RS-422 with the driver permanently enabled, 2-5 Mbit, one packet per servo period in each direction.
- Instance numbering as in the table, please: PktUART 0 stays on TB2 (so existing configs keep working), StepGen 5 and QCount 1 are the highest instances, so I can turn them into GPIO with num_stepgens=5 / num_encoders=1 when they are not needed.
- If it does not all fit into the T20, please drop in this order: QCount 1 first, then PktUART 4, then StepGen 5. PktUARTs 1-3 are the ones I really need.
Questions:
1. Does this fit (5 PktUART V3 in total, 6 StepGens, 2 QCounts)?
2. hm2_modbus without a TX enable pin: is the receiver masked while we transmit (RXMASK driven by the internal drive enable), or should the transceiver's receiver be disabled during TX to avoid the echo?
3. Lever link: for full-duplex use I plan to set the drive enable bit statically and the auto bit off in my own HAL component. Is that the right way with PktUART V3, or would you configure it differently?
4. Is the 7I87 expected to be available again?
If it is easier for you, I can also build it myself with Efinity from the 7i96s sources - in that case a hint which PIN file to start from (PIN_7I96SD_PKTV3?) would be much appreciated.
Thank you very much for your support,
Thorsten
Last edit: 16 Oct 2026 17:43 by MueTho.
Please Log in or Create an account to join the conversation.
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 18104
- Thank you received: 5328
16 Oct 2026 15:49 #350296
by PCW
1. Fits easily
2. Yes, RX is masked during TX (if enabled by the driver and pretty sure hm2-modbus does this)
3. Not sure, if hm2_modbus knows how to do full duplex, but yes at the PktUART level, you would just assert
TXEN permanently
4. We should have more 7I87s in 2 weeks
Note that normally only one PktUART is used (since you can have multiple MODBUS devices on one RS-485 bus)
so you may well uncover some bugs...
Replied by PCW on topic 7i96S custom bitfile: 4x PktUART V3 on P1 (3x Modbus + 1 full-duplex link) + St
1. Fits easily
2. Yes, RX is masked during TX (if enabled by the driver and pretty sure hm2-modbus does this)
3. Not sure, if hm2_modbus knows how to do full duplex, but yes at the PktUART level, you would just assert
TXEN permanently
4. We should have more 7I87s in 2 weeks
Note that normally only one PktUART is used (since you can have multiple MODBUS devices on one RS-485 bus)
so you may well uncover some bugs...
Attachments:
The following user(s) said Thank You: tommylight, MueTho
Please Log in or Create an account to join the conversation.
- MueTho
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 2
- Thank you received: 0
16 Oct 2026 17:35 #350297
by MueTho
Replied by MueTho on topic 7i96S custom bitfile: 4x PktUART V3 on P1 (3x Modbus + 1 full-duplex link) + St
Hi Peter,
thank you very much for the bitfile - and for the incredibly fast support, that was a really nice surprise!
7i96sd_pktv3x5 is flashed (user area, verify OK) and readhmid matches your pin file.
I ran a short bench test of everything in halrun (LinuxCNC 2.9.10, 1 ms servo thread, nothing connected to P1 yet), and all of it works:
- all modules show up in HAL: 6 stepgens, 2 encoders, pktuart.0 to .4, InM, SSR, OutM, PWM
- stepgen.05 on P1: 2010 counts in 2 s at 1000 steps/s
- GPIO IO36/40/41/42: output low/high with read-back OK, pull-up high as input
- with config="num_stepgens=5 num_encoders=1", IO34/35 and IO37-39 become normal GPIO
(output/read-back OK), so the optional functions can be switched off without a new bitfile
- hm2_modbus with 5 instances at the same time (pktuart.0 to .4): instance 0 (one A6 drive on TB2)
stays error-free, instances 1-4 just report timeouts as expected since nothing is connected there
- max. times: read ~200-220 us, write ~50 us, servo thread ~260 us with 1 instance and ~285 us with
5 instances; no watchdog bite
My plan for testing the multiple Modbus instances with real hardware:
1. Breadboard 3.3 V RS-485 transceivers with automatic direction control on P1 for pktuart.1, .2 and .4 - one A6 drive on each port (the real P1 interface board comes later).
2. Run all hm2_modbus instances in parallel at 1 ms servo period, each polling a single register as fast as possible plus a larger diagnostic block once per second.
3. Long run (several hours, LinuxCNC + AXIS running) while logging error counters, cycle time per port and hm2 read/thread times.
4. Check that there is no echo with the auto-direction transceivers (RX masking), unplug/replug and power-cycle a drive to see how each instance recovers, and check the behaviour after a watchdog bite.
If you would approach this differently, or if there is something specific I should watch for with several PktUARTs/hm2_modbus instances, I'd be very grateful for any tips. I'll report the results here.
Thanks again
Thorsten
thank you very much for the bitfile - and for the incredibly fast support, that was a really nice surprise!
7i96sd_pktv3x5 is flashed (user area, verify OK) and readhmid matches your pin file.
I ran a short bench test of everything in halrun (LinuxCNC 2.9.10, 1 ms servo thread, nothing connected to P1 yet), and all of it works:
- all modules show up in HAL: 6 stepgens, 2 encoders, pktuart.0 to .4, InM, SSR, OutM, PWM
- stepgen.05 on P1: 2010 counts in 2 s at 1000 steps/s
- GPIO IO36/40/41/42: output low/high with read-back OK, pull-up high as input
- with config="num_stepgens=5 num_encoders=1", IO34/35 and IO37-39 become normal GPIO
(output/read-back OK), so the optional functions can be switched off without a new bitfile
- hm2_modbus with 5 instances at the same time (pktuart.0 to .4): instance 0 (one A6 drive on TB2)
stays error-free, instances 1-4 just report timeouts as expected since nothing is connected there
- max. times: read ~200-220 us, write ~50 us, servo thread ~260 us with 1 instance and ~285 us with
5 instances; no watchdog bite
My plan for testing the multiple Modbus instances with real hardware:
1. Breadboard 3.3 V RS-485 transceivers with automatic direction control on P1 for pktuart.1, .2 and .4 - one A6 drive on each port (the real P1 interface board comes later).
2. Run all hm2_modbus instances in parallel at 1 ms servo period, each polling a single register as fast as possible plus a larger diagnostic block once per second.
3. Long run (several hours, LinuxCNC + AXIS running) while logging error counters, cycle time per port and hm2 read/thread times.
4. Check that there is no echo with the auto-direction transceivers (RX masking), unplug/replug and power-cycle a drive to see how each instance recovers, and check the behaviour after a watchdog bite.
If you would approach this differently, or if there is something specific I should watch for with several PktUARTs/hm2_modbus instances, I'd be very grateful for any tips. I'll report the results here.
Thanks again
Thorsten
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
- Hardware & Machines
- Driver Boards
- 7i96S custom bitfile: 4x PktUART V3 on P1 (3x Modbus + 1 full-duplex link) + St
Time to create page: 0.088 seconds