Changes in configuration files generated in pncconfig for 7i76 to 7i78

  • jaro_p
  • jaro_p's Avatar Topic Author
  • Away
  • Senior Member
  • Senior Member
More
04 Dec 2025 08:14 #339718 by jaro_p
Hello. I would like to advise how to change the configuration files (I assume it concerns .hal and .ini) generated by the pncconfig program for 7i76. Linuxcnc is installed on 7c81 and the firmware is for two 7i78. Two axes for the lathe and most of the necessary switches are without problems. However, I need control of the main spindle and input from the incremental encoder for the spindle and a serial port for the 7i73 handwheel and possibly additional buttons.
I apologize for the possibly trivial question. But I had a break from using Linuxcnc for several years and I simply forgot a lot of things, not to mention that many things were never completely clear to me.Now that I'm retired, I finally have enough time for all of this, but unfortunately, it's too complex for me.

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
04 Dec 2025 12:26 #339723 by tommylight
Use simple text editors included with Linux, like Xed for Mate, Kate for KDE, Mousepad for XFCE, Gedit for Gnome, etc, etc.
Or install (might be already for LinuxCNC ISO) Geany as it has more features and can do highlighting and stuff.
A correction, the Mesa 7i73 is a SSerial (Smart Serial) card, not serial as serial is usually referred to RS232.
You can also edit the existing config with the PncConf wizard, it has the option to edit at the very start. Beware that any manual editing of the config files will be overridden if you edit them with the wizard.
Also, you can make as many configs as you like for the same machine or for other machines on the same PC, so feel free to experiment and edit as much as you like or need, but do make a habit of saving backups of working configs.

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

  • jaro_p
  • jaro_p's Avatar Topic Author
  • Away
  • Senior Member
  • Senior Member
More
04 Dec 2025 13:48 - 04 Dec 2025 14:07 #339728 by jaro_p
Thanks for the answer, but I understand that I have to edit it.
Only the 7i76 card has a different pin arrangement. Otherwise, the pins on P1 are DB25. Fortunately, the pins for the first four axes are identical. I already wrote that, it works without problems.
But while the 7i78 has spindle control, serial interface and encoder for the spindle on pins 05-13, the 7i76 has an output for the fifth stepper motor, two serial interfaces and an encoder on the same pins. That encoder is labeled ENx, unlike the encoder on the 7i78 - it is QUADx. I don't know if it's the same.
So if, for example, I activate the spindle encoder on P1 in pncconf, will it be the same for the 7i78? And further, on connectors P1 and P2 (on which the 7i78 can be physically located), there is no option to set spindle dir, enable. I set this on P7 but I need it to be on P1. Will it be enough to overwrite the IO number and will it work?
Let me not forget, on the P7 pins it is possible to set the direction of rotation for the spindle - two pins, but on the P1 DB25 there is a SPINDIR pin which is one pin. So if I set one pin on P7 to CW and the other to CCW, will it get to the right place on the 7i78?
Last edit: 04 Dec 2025 14:07 by jaro_p.

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

More
04 Dec 2025 15:24 #339732 by PCW
Whats actual hardware do you have?

It sounds like a 7C81 and one 7I78.

It that case is might be simpler to use something like a pncconf 5i25/G540 configuration
as a starting point as that would al least let you setup the PWM spindle in pncconf.

In general, if you have the correct firmware for the daughtercard, the pins don't matter
in the hal files, what is significant is the module number like stepgen 0,1,2,3, etc.
The exception is GPIO pins.

The 7I78 encoder pins will have names like hm2_7c81.0.encoder.00.position.
7I73 MPG encoders will have names like hm2_7c81.0.7i73.0.0.enc0.position

Note that you can list all pin and parameter names when LinuxCNC is running with:

halcmd show all hm2





 

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

  • jaro_p
  • jaro_p's Avatar Topic Author
  • Away
  • Senior Member
  • Senior Member
More
05 Dec 2025 08:53 #339752 by jaro_p
Thanks for the answer. There is one 7i78 -> P1 connected to 7c81, one optocoupler board on P7 and when I know how to do it, one 7i73. Why not pncconf for 7i76 but G540? It's more similar to 7i78. So with that encoder it means that it doesn't matter where and what encoder I choose, just change the name in .hal according to your example? Sorry for the question, will it be clear that it is a spindle encoder? Although it may be a stupid question, 7i78 has only one encoder and it is for the spindle... In the manual for 7c81 the encoder is marked as ENCA+, ENCA-, ENCB+, ENCB-, IDX+, IDX-. I don't know how it will look in .hal, because pncconf does not have the option to configure the 7c81 board. Well, with the list of parameters, it's clear, but as I already wrote, I'm completely lost and it's going slowly :).

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

  • jaro_p
  • jaro_p's Avatar Topic Author
  • Away
  • Senior Member
  • Senior Member
More
05 Dec 2025 11:17 - 05 Dec 2025 11:20 #339757 by jaro_p
The command you recommended wrote this:
halcmd show all hm2
Loaded HAL Components:
ID Type Name PID State

Component Pins:
Owner Type Dir Value Name

Pin Aliases:
Alias Original Name

Signals:
Type Value Name (linked to)

Parameters:
Owner Type Dir Value Name

Parameter Aliases:
Alias Original Name

Exported Functions:
Owner CodeAddr Arg FP Users Name

Realtime Threads:
Period FP Name ( Time, Max-Time )

This works:
halcmd -kf
halcmd: loadrt hostmot2
halcmd: loadrt hm2_rpspi
halcmd: show all hm2
 
Last edit: 05 Dec 2025 11:20 by jaro_p.

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

More
05 Dec 2025 16:39 #339761 by PCW
I suggested the G540 configuration because it includes  PWM generator that you can use
with pncconf for setting up the the spindle, the 7I76 configuration does not.

On the halcmd, yes you need the driver loaded, as I mentioned:

Note that you can list all pin and parameter names when LinuxCNC is running with:

ENCA+, ENCA-, ENCB+, ENCB-, IDX+, IDX- are all physical signal names and are not present in hal

encoder hal pins and parameters will all have names like:

hm2_7c81.0.encoder.00.position
hm2_7c81.0.encoder.00.index-enable
 etc etc

Where  the 00 in hm2_7c81.0.encoder.00.position is the encoder number

with 7C81 7i78X2d or 7I78x3d firmware, encoder 0 would be on P1

If you want to use encoder 0 on P1 for the spindle encoder, you select encoder 0
as spindle encoder  in pncconf. Similarly PWMgen 0 is on P1 with the 7I78 firmware
so pwmgen 0 would be selected for spindle speed control.





 

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

  • jaro_p
  • jaro_p's Avatar Topic Author
  • Away
  • Senior Member
  • Senior Member
More
05 Dec 2025 20:11 #339769 by jaro_p
Ok, thanks, I'll try the G540.

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

  • jaro_p
  • jaro_p's Avatar Topic Author
  • Away
  • Senior Member
  • Senior Member
More
15 Dec 2025 08:50 #340115 by jaro_p
Hello, I was trying to change the bitfile in my 7c81 so that there would be only one 7i78 on port P1. Port P2 would be freed up for separate MPGs for X and Z axes. So there would be no need for 7i33 (which would probably be another complication I wouldn't go through). But in the Mesa firmware there is no 7i78x2 configuration, nor 7i78 for Xilinx ISE (*.xise). Is it possible to download this configuration somewhere else?

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

Moderators: cmorley
Time to create page: 0.272 seconds
Powered by Kunena Forum