Small victory in the war against the Cincinnati cinturn 12u

More
04 Nov 2022 00:06 #255880 by andypugh

So, Hal reads and executes the file how often ? Is it a single loop subroutine ? or a single loop open ended main routine with a need for a callback to start ?

I thought that I had explained this, but the HAL file is read only once, at the beginning. 

All the HAL pins are connected up as defined by the net commands (if you are interested, all that really happens is that the internal variables of the C-code that defines the functions internally that are part of the same net are moved into the same memory address. So a variable called "out1" of one bit of code will have the exact same memory address as the pins "in2" and "latch" (for example) of other bits of code) 

Then, every SERVO-THREAD period all the functions that have been "addf-ed" to the SERVO-THREAD are executed in strict one-by-one sequence. 
Each component reads its inputs, does it's internal thing, and updates its outputs. Then the next function is executed. 

The same is true of BASE-THREAD. 

Some components have more than one function, for example the software stepgen has a very fast, integer-only BASE-THREAD function to create pulses and a more complicated one that runs in the SERVO-THREAD to calculate the required step rate. 
And the Mesa driver has separate READ and WRITE functions, so that all inputs are read at the start of the thread cycle, and all outputs are updated at the end. 
 

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

More
04 Nov 2022 00:14 #255881 by smc.collins
ok, So if for instance

net.toolchange,output is a run once, or it runs on every call to M6 , does it store the variable of the tool number somewhere in hal or do I have to declare the storage or is it part of the component.

Is there a way to fetch without grep the commands in each component or better to just read the C file?

Also is the carousel component called on every m6, or just each time through the main hal routine ? just trying to wrap my head around how the program works, my mind needs to connect things like virtual physical blocks with a label assigned to each block. sounds weird but I see things as complex interacting machines as mental visual images. So I will often design a part in my head before I begin making it. that's why most of the tutorials are useless until I see the code as the parts and how they interact as functional mechanisms and I can label them. at some point it'll hopefully just click

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

More
04 Nov 2022 00:38 #255882 by andypugh

net.toolchange,output is a run once, or it runs on every call to M6 , does it store the variable of the tool number somewhere in hal or do I have to declare the storage or is it part of the component.


Components can store their own internal data, they are just small programs.

Is there a way to fetch without grep the commands in each component or better to just read the C file?


Components don't have commands. They only have inputs and outputs. (which are just numbers)

Also is the carousel component called on every m6, or just each time through the main hal routine


carousel sits there, generally doing nothing. Every thread cycle it checks to see if the "enable" input pin has gone high. If it has, and if the pocket-number pin has a different number to what the feedback sensors are telling it, then it enters a different state, and outputs a motor command on an output pin.
Then, when the position feedback input pins tell it that it is in the right place, it turns off the motor controls pins, signals "ready" and goes back to waiting.

So, the only way that caraousel knows that there is a tool change going on is generally when the iocontrol.0.tool-change pin goes high. (And that _is_ directly controlled by the M6 command)
The following user(s) said Thank You: smc.collins

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

More
04 Nov 2022 00:43 #255883 by andypugh
Sorry, missed a question.

To see the pins and functions of any hal component, either use "man name" at the command line (eg, "man carousel")

Or, more legibly and less geekily, look in the web docs:
linuxcnc.org/docs/stable/html/
The realtime and userspace components are all listed at the bottom.
There are many of them, and it's possibly worth a _very_ superficial skim through them to get a feel for what they do.

Most are very simple. motion is very complicated (it's the entire motion controller).

The main ones to look at for everyday reference are motion, halui and io.
The following user(s) said Thank You: Clive S, smc.collins

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

More
04 Nov 2022 21:16 #255963 by smc.collins

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

More
04 Nov 2022 21:26 #255967 by piflixe
We are in the process of retrofitting a Morbidelli U13 woodworking machine with a 7i97. Basic config is already working, all axes moving correctly. So if it helps I can share our config or give you some hints on how to set it up. Still new to Mesa cards and LinuxCNC but I am happy to give back some of the advice I received from the forum.
The following user(s) said Thank You: tommylight, smc.collins

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

More
04 Nov 2022 23:16 - 04 Nov 2022 23:25 #255977 by smc.collins
I'm into hal and ladder configuration at this point, had a x axis casting failure  thank you for the offer, it is appreciated. i do casting repairs if anyone needs them BTW
Last edit: 04 Nov 2022 23:25 by smc.collins.
The following user(s) said Thank You: tommylight

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

More
06 Nov 2022 20:46 - 06 Nov 2022 20:51 #256094 by smc.collins
got the X axis all put back together, back to the brain food, need to remove that damn transformer too, it isn't needed anymore   
Last edit: 06 Nov 2022 20:51 by smc.collins.
The following user(s) said Thank You: tommylight

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

More
07 Nov 2022 01:12 #256106 by smc.collins
is there a limit to the number of serial io cards you can use ?? or should i use something else ??? i have 2 control panels I'd like to bring back toniseable condition and a USB xhc wireless pendant.

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

More
07 Nov 2022 02:56 #256111 by smc.collins
first pass at turret config
Attachments:

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

Moderators: piasdom
Time to create page: 0.118 seconds
Powered by Kunena Forum