ini to HAL communication
The conceptual one first. What is the information linkage between the ini file and the HAL file. I'm hand editing these, BTW. The ini file refers to [JOINTS] and the HAL file obviously defines the signal at a hardware level (in my case printer port pins). The ini file describes things at a higher, generic level. The HAL file is just wiring. However, I don't see any variables that link these. I'm puzzled.
The specific question. I have a router that is turned on/off with a relay. I've used the M03/M04 and M05 G-Codes in the past with MACH3 and the arrangement worked, the relay is controlled via pin 17 on the parallel port. I put some code in the HAL file to activate that pin.
net spindle-enable spindle.N.on => parport.0.pin-17-out
Is the variable spindle-enable a fixed name for the spindle? Are all the names in the HAL file reserved, fixed names? I'm a programmer, I'm used to writing my own variable names...
Please Log in or Create an account to join the conversation.
ie HAL can read the INI for settings or names.
or the motion component can read the INI and export extra HAL pins based on the information it finds.
in your example 'spindle-enable' is a signal name. Signal names are user defined.
Please Log in or Create an account to join the conversation.
net spindle-enable spindle.N.on => parport.0.pin-17-out
Is the variable spindle-enable a fixed name for the spindle? Are all the names in the HAL file reserved, fixed names? I'm a programmer, I'm used to writing my own variable names...
The first name after a NET is a signal and can be anything you like. The signal is then connected to HAL pins
linuxcnc.org/docs/2.8/html/hal/intro.html
Please Log in or Create an account to join the conversation.
I had imagined that the ini file would act as a level of indirection between the conceptual and the physical. The physical being defined in the HAL file. Perhaps not?
My thought was that variables would be defined in the ini file and that the HAL file would associate the ini variables with physical devices. So that the signal spindle-enable would be defined in the ini file and then associated with pin 17 by a reference in the HAL file?
In my, probably mistaken, conception the ini file would define things that are entirely machine independent and only the HAL file would be machine specific.
Please Log in or Create an account to join the conversation.
So is the spindle.0.on identifier a reserved, fixed name?
Yes that is a HAL Pin that is defined.
linuxcnc.org/docs/2.8/html/man/man9/spindle.9.html
Once you run LCNC the system will check if the hal-pins used in HAL are actually available and abort with an error if it comes across a missing pin.
In my, probably mistaken, conception the ini file would define things that are entirely machine independent and only the HAL file would be machine specific.
Roughly the ini file defines values and paths while the hal file defines signals and their connections.
Please Log in or Create an account to join the conversation.
m3 is interpreted by the rs274 interpreter which sends a NML message to the motion component to set the spindle HAL pin appropriately.
linuxcnc.org/docs/devel/html/code/code-n...rchitecture_overview
Please Log in or Create an account to join the conversation.
spindle.N.enable bit in -- If FALSE, the spindle is stopped at the gear’s maximum deceleration
So I presume N is a number that identifies which spindle on a machine that might have more than one. However, the M03 code is specifically associated with spindle.0.enable and not any possible others?
I know I'm asking theoretical questions but I'm simply trying to grasp the information flow.
Please Log in or Create an account to join the conversation.
are you looking at the correct docs for master?
linuxcnc.org/docs/devel/html/gcode/m-code.html#mcode:m3-m4-m5
Please Log in or Create an account to join the conversation.
linuxcnc.org/docs/html/getting-started/u...iple_spindle_support
Please Log in or Create an account to join the conversation.
I get an error message when LinuxCNC 2.8.1 starts up that the pin spindle.0.enable doesn't exist .
Please Log in or Create an account to join the conversation.