Best/easiest way to hook up a 7i73 to a PC?

More
19 May 2022 23:54 #243373 by andypugh

Adding 'start' makes no difference unfortunately. 

"Start" was just for the standalone halcmd prompt that you seemed to be showing. 

My fingers type:

halrun
loadrt hostmot2
loadrt hm2_pci
loadrt threads
addf <tab> read <tab>
addf <tab> write <tab>
start

Pretty much without conscious thought after a decade of playing with Mesa drivers. ;-)

 
The following user(s) said Thank You: arvidb

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

More
20 May 2022 02:41 #243386 by PCW
The following user(s) said Thank You: arvidb

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

More
20 May 2022 04:21 #243391 by arvidb
I tried switching the polarities (both of them simultaneously) so that 7i73 TX+ & RX+ are connected to the inverting input and output of the MAX490, respectively (like in the SP491 thread linked by PCW), but that didn't solve my issue.

I also took a close look at the TTL/RS422 converter board . In the advert they specify 10 Ω current limiting resistors on each output terminal (weird since if they use genuine Maxim parts the drivers are already short-circuit current limited AND have thermal shutdown); the resistors actually fitted are 100 Ω! Also there are two 120 Ω termination resistors, one for the RX line (correct) and one for the TX line (incorrect). However they are both fitted in what seems like "placeholder" positions - none are actually connected! I guess this is what you get buying dirt cheap no-name Ebay electronics...

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

More
20 May 2022 05:29 #243395 by arvidb
I removed (shorted) the current limiting resistors and connected the RX termination. Still no luck - also tested with non-inverted signals. Time to take a break from this and let it stew for awhile I think.

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

More
20 May 2022 06:38 #243397 by arvidb
Are the 8-channel sserial ports assigned dynamically or are they fixed by firmware? I.e. with the 7i77_7i74 firmware loaded onto the 6i25, will the 7i74 channels always be sserial_port_1, even if the 7i77 is not connected?

Should the 7i73 work (be auto-detected) even with no hm2_pci config string at all?

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

More
20 May 2022 12:45 #243405 by PCW
The port /channel assignments are fixed
The sserial_port_1=nnnnnnnn statement is required
The following user(s) said Thank You: arvidb

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

More
20 May 2022 13:06 #243408 by andypugh
It's probably worth putting the 7i73 back on the 7i77 system, just to be sure that it still works. Also look at the LEDs during boot so you know what to expect.
The following user(s) said Thank You: arvidb

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

More
20 May 2022 20:07 - 20 May 2022 20:19 #243424 by arvidb

The port /channel assignments are fixed
The sserial_port_1=nnnnnnnn statement is required


This was it! I was using config="sserial_port_0=00000000"!

There seems to be some kind of inconsistency (bug?) associated with how linuxcnc (or the 5i25 firmware?) handles the port numbers which threw me off. With nothing at all connected to the 6i25, and with no config= statement, I get the expected IOPort config displayed on linuxcnc start:
hm2: loading Mesa HostMot2 driver version 0.15
hm2_pci: loading Mesa AnyIO HostMot2 driver version 0.7
hm2_pci: discovered 5i25 at 0000:04:00.0
hm2/hm2_5i25.0: Low Level init 0.15
hm2/hm2_5i25.0: Smart Serial Firmware Version 43
hm2/hm2_5i25.0: Smart Serial Firmware Version 43
hm2/hm2_5i25.0: 34 I/O Pins used:
hm2/hm2_5i25.0:     IO Pin 000 (P3-01): IOPort
hm2/hm2_5i25.0:     IO Pin 001 (P3-14): IOPort
hm2/hm2_5i25.0:     IO Pin 002 (P3-02): IOPort
hm2/hm2_5i25.0:     IO Pin 003 (P3-15): IOPort
hm2/hm2_5i25.0:     IO Pin 004 (P3-03): IOPort
hm2/hm2_5i25.0:     IO Pin 005 (P3-16): IOPort
hm2/hm2_5i25.0:     IO Pin 006 (P3-04): IOPort
hm2/hm2_5i25.0:     IO Pin 007 (P3-17): Muxed Encoder Select #0, pin Mux Select 0 (Output)
hm2/hm2_5i25.0:     IO Pin 008 (P3-05): Muxed Encoder #0, pin Muxed A (Input)
hm2/hm2_5i25.0:     IO Pin 009 (P3-06): Muxed Encoder #0, pin Muxed B (Input)
hm2/hm2_5i25.0:     IO Pin 010 (P3-07): Muxed Encoder #0, pin Muxed Index (Input)
hm2/hm2_5i25.0:     IO Pin 011 (P3-08): Muxed Encoder #1, pin Muxed A (Input)
hm2/hm2_5i25.0:     IO Pin 012 (P3-09): Muxed Encoder #1, pin Muxed B (Input)
hm2/hm2_5i25.0:     IO Pin 013 (P3-10): Muxed Encoder #1, pin Muxed Index (Input)
hm2/hm2_5i25.0:     IO Pin 014 (P3-11): Muxed Encoder #2, pin Muxed A (Input)
hm2/hm2_5i25.0:     IO Pin 015 (P3-12): Muxed Encoder #2, pin Muxed B (Input)
hm2/hm2_5i25.0:     IO Pin 016 (P3-13): Muxed Encoder #2, pin Muxed Index (Input)
hm2/hm2_5i25.0:     IO Pin 017 (P2-01): IOPort
hm2/hm2_5i25.0:     IO Pin 018 (P2-14): IOPort
hm2/hm2_5i25.0:     IO Pin 019 (P2-02): IOPort
hm2/hm2_5i25.0:     IO Pin 020 (P2-15): IOPort
hm2/hm2_5i25.0:     IO Pin 021 (P2-03): IOPort
hm2/hm2_5i25.0:     IO Pin 022 (P2-16): IOPort
hm2/hm2_5i25.0:     IO Pin 023 (P2-04): IOPort
hm2/hm2_5i25.0:     IO Pin 024 (P2-17): IOPort
hm2/hm2_5i25.0:     IO Pin 025 (P2-05): IOPort
hm2/hm2_5i25.0:     IO Pin 026 (P2-06): IOPort
hm2/hm2_5i25.0:     IO Pin 027 (P2-07): IOPort
hm2/hm2_5i25.0:     IO Pin 028 (P2-08): IOPort
hm2/hm2_5i25.0:     IO Pin 029 (P2-09): IOPort
hm2/hm2_5i25.0:     IO Pin 030 (P2-10): IOPort
hm2/hm2_5i25.0:     IO Pin 031 (P2-11): IOPort
hm2/hm2_5i25.0:     IO Pin 032 (P2-12): IOPort
hm2/hm2_5i25.0:     IO Pin 033 (P2-13): IOPort
hm2/hm2_5i25.0: registered
hm2_5i25.0: initialized AnyIO board at 0000:04:00.0

Still with nothing connected but using 'loadrt hm2_pci config="sserial_port_0=00000000"' (note port zero):
hm2: loading Mesa HostMot2 driver version 0.15
hm2_pci: loading Mesa AnyIO HostMot2 driver version 0.7
hm2_pci: discovered 5i25 at 0000:04:00.0
hm2/hm2_5i25.0: Low Level init 0.15
hm2/hm2_5i25.0: Smart Serial Firmware Version 43
hm2/hm2_5i25.0: 34 I/O Pins used:
hm2/hm2_5i25.0:     IO Pin 000 (P3-01): IOPort
hm2/hm2_5i25.0:     IO Pin 001 (P3-14): IOPort
hm2/hm2_5i25.0:     IO Pin 002 (P3-02): IOPort
hm2/hm2_5i25.0:     IO Pin 003 (P3-15): IOPort
hm2/hm2_5i25.0:     IO Pin 004 (P3-03): IOPort
hm2/hm2_5i25.0:     IO Pin 005 (P3-16): IOPort
hm2/hm2_5i25.0:     IO Pin 006 (P3-04): IOPort
hm2/hm2_5i25.0:     IO Pin 007 (P3-17): Muxed Encoder Select #0, pin Mux Select 0 (Output)
hm2/hm2_5i25.0:     IO Pin 008 (P3-05): Muxed Encoder #0, pin Muxed A (Input)
hm2/hm2_5i25.0:     IO Pin 009 (P3-06): Muxed Encoder #0, pin Muxed B (Input)
hm2/hm2_5i25.0:     IO Pin 010 (P3-07): Muxed Encoder #0, pin Muxed Index (Input)
hm2/hm2_5i25.0:     IO Pin 011 (P3-08): Muxed Encoder #1, pin Muxed A (Input)
hm2/hm2_5i25.0:     IO Pin 012 (P3-09): Muxed Encoder #1, pin Muxed B (Input)
hm2/hm2_5i25.0:     IO Pin 013 (P3-10): Muxed Encoder #1, pin Muxed Index (Input)
hm2/hm2_5i25.0:     IO Pin 014 (P3-11): Muxed Encoder #2, pin Muxed A (Input)
hm2/hm2_5i25.0:     IO Pin 015 (P3-12): Muxed Encoder #2, pin Muxed B (Input)
hm2/hm2_5i25.0:     IO Pin 016 (P3-13): Muxed Encoder #2, pin Muxed Index (Input)
hm2/hm2_5i25.0:     IO Pin 017 (P2-01): Smart Serial Interface #1, pin rx0 (Input)
hm2/hm2_5i25.0:     IO Pin 018 (P2-14): Smart Serial Interface #1, pin rx1 (Input)
hm2/hm2_5i25.0:     IO Pin 019 (P2-02): Smart Serial Interface #1, pin rx2 (Input)
hm2/hm2_5i25.0:     IO Pin 020 (P2-15): Smart Serial Interface #1, pin rx3 (Input)
hm2/hm2_5i25.0:     IO Pin 021 (P2-03): Smart Serial Interface #1, pin tx0 (Output)
hm2/hm2_5i25.0:     IO Pin 022 (P2-16): Smart Serial Interface #1, pin tx1 (Output)
hm2/hm2_5i25.0:     IO Pin 023 (P2-04): Smart Serial Interface #1, pin tx2 (Output)
hm2/hm2_5i25.0:     IO Pin 024 (P2-17): Smart Serial Interface #1, pin tx3 (Output)
hm2/hm2_5i25.0:     IO Pin 025 (P2-05): Smart Serial Interface #1, pin rx4 (Input)
hm2/hm2_5i25.0:     IO Pin 026 (P2-06): Smart Serial Interface #1, pin rx5 (Input)
hm2/hm2_5i25.0:     IO Pin 027 (P2-07): Smart Serial Interface #1, pin rx6 (Input)
hm2/hm2_5i25.0:     IO Pin 028 (P2-08): Smart Serial Interface #1, pin rx7 (Input)
hm2/hm2_5i25.0:     IO Pin 029 (P2-09): Smart Serial Interface #1, pin tx4 (Output)
hm2/hm2_5i25.0:     IO Pin 030 (P2-10): Smart Serial Interface #1, pin tx5 (Output)
hm2/hm2_5i25.0:     IO Pin 031 (P2-11): Smart Serial Interface #1, pin tx6 (Output)
hm2/hm2_5i25.0:     IO Pin 032 (P2-12): Smart Serial Interface #1, pin tx7 (Output)
hm2/hm2_5i25.0:     IO Pin 033 (P2-13): Smart Serial Interface #1, pin txen7 (Output)
hm2/hm2_5i25.0: registered
hm2_5i25.0: initialized AnyIO board at 0000:04:00.0

This made me assume that port assignments were dynamic and that P3 was simply skipped with no 7i77 attached.

---

The final, working connection diagram (inspired by the SP491 thread):
7i73 J1-1 RX- = 7i84 RXA --- or/wh --- MAX490-5 Y
7i73 J1-2 RX+ = 7i84 RXB --- or    --- MAX490-6 Z (note 7i73 RX+ connected to inverting output)
7i73 J1-3 TX- = 7i84 TXA --- gr/wh --- MAX490-8 A
7i73 J1-4 GND = 7i84 GND --- bl    ---
7i73 J1-5 GND = 7i84 GND --- bl/wh ---
7i73 J1-6 TX+ = 7i84 TXB --- gr    --- MAX490-7 B (note 7i73 TX+ connected to inverting input)
7i73 J1-7 +5V = 7i84 +5V --- br/wh ---
7i73 J1-8 +5V = 7i84 +5V --- br    ---

MAX490 A+/B -> RO --- 6i25 RXDataN
MAX490 Y+/Z -> DI --- 6i25 TXDataN

(MAX490 pin numbers for DIP/SO capsule; µMAX is different.)
Last edit: 20 May 2022 20:19 by arvidb.

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

More
20 May 2022 20:28 #243427 by PCW
The driver is a bit inconsistent in that sserial port0 is enabled
by default (using modes "00000000") but sserial ports 1,2,3 are
disabled by default (using modes "XXXXXXXX")

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

More
20 May 2022 20:51 #243430 by arvidb
But why does the config="sserial_port_0=00000000" statement force all of the P2 IO pins into Smart Serial interfaces?

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

Moderators: PCWjmelson
Time to create page: 0.214 seconds
Powered by Kunena Forum