Sieg KX3 and 5i25. Seeking firmware.

More
24 Jun 2016 23:59 #76619 by andypugh

Not questioning but is there any reason for not using the charge pump feature?


The suggestion is definitely to use the charge-pump hardware. But driven by a stepgen on the FPGA card not by software.
The following user(s) said Thank You: mooser

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

More
25 Jun 2016 00:06 #76620 by mooser
Got it, never thought of the chargepump being software.
I've actually just changed a jumper on the c11g card to bypass the chargepump as I attempt to get anything to work and I don't seem to have anyway of telling if the board is allowing movement (chargepump on or program e-stop off)
I can see some of the leds on the board change state when I click the machine button on the linuxcnc software but because of where the board is mounted I can't tell which ones they are.
Thanks again for the help
M

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

More
25 Jun 2016 02:25 #76626 by PCW
its strange to use stepgen 1 for X so that appears to be a pncconf bug with the probrfx2 config

Normally you would expect X to be stepgen 0, Y to be stepgen 1 etc, and the C11 bitfile
matches this

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

More
25 Jun 2016 02:43 #76627 by mooser
I've got this so screwed up now it's a sure bet something I've put in wrong rather than any bug.

I'm pretty much at the point where this switch over needs to go back to mach. Trying to wrap my poor old head around the Bitfile/hal and ini files is proving beyond my abilities.
What little progress I thought I made got wiped out earlier this evening when I tried getting the chargepump to work as a step and ended up with an error about the GS2 not being found. I can't even find where I mentioned anything about the spindle....

Maybe at some point later on I'll have another look but I think it's time to toss in the towel
Thanks
M

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

More
28 Jun 2016 09:49 #76728 by andypugh

I'm pretty much at the point where this switch over needs to go back to mach. Trying to wrap my poor old head around the Bitfile/hal and ini files is proving beyond my abilities.


Maybe we have just made a bad job of explaining things?

With a parallel port some pins are inputs and some pins are outputs. But other than those restrictions you can send step signals and direction signals from any pin. In HAL you see individual HAL pins corresponding to physical pins on the connector.

With the Mesa card any pin can be an input or an output, but the function of each physical pin is hard-coded in the bitfile. In the HAL layer you do not see HAL pins corresponding to the step and direction pins, you see the stepgen position or velocity inputs instead.
If you disable some step-generators in the firmware then the associated pins become available as GPIO pins (and can be individually configured as input or output) But you can only disable functions from the highest-numbered downwards.

The firmware you have has been configured with stepgens both for the spindle and the charge-pump.

I think that some of your trouble is that you are trying to make changes in Pncconf to achieve specific results in HAL, and in this regard Pncconf is something of an impenetrable black box.

Perhaps you need to become more familiar with HAL. Once you get used to it it is a very flexible and useful tool. Try this:
(Note that you can use the TAB key to autocomplete commands, for example loadr<tab> hostm<tab>)
Open a terminal window and type the following:
loadrt hostmot2
loadrt hm2_pci
loadrt threads
addf hm2_5i25.0.read thread1
addf hm2_5i25.0.write thread1
start

You should now have a live and working realtime system and powered-up Mesa card.
For reference you can make a list of all the Mesa card HAL pins:
show pin
And all the setting (parameters)
show param
It is probably a good idea to copy these pin and parameter lists into a text file for later reference.
All the entries you see in the HAL file part of your config are commands that you can use in the HAL environment that you are now in.

One very simple example:
setp hm2_5i25.0.CR01 1
should turn on an LED on the 5i25
setp hm2_5i25.0.CR01 0
will turn it off again.

It should be possible to control the spindle using the HAL interface too. Something a bit like this (but I am guessing HAL pin names and config details). Control-type 1 sets the stepgen to speed control mode. The correct scale setting will depend on your peak spindle speed and the expectations of the G11G. Consider it an adjustment
setp hm2_5i25.0.stepgen.04.control-type 1
setp hm2_5i25.0.stepgen.04.scale 4000
setp hm2_5i25.0.stepgen.04.enable 1
setp hm2_5i25.0.velocity-cmd 1000

You probably need to "setp" an IO pin to turn the spindle on, too. Changing velocity-cmd should change the spindle speed.

The point of this is twofold: To show that HAL is not complicated if you take it in small chunks, and to demonstrate that HAL is actually a fairly convenient place to try things out and debug without the complications if the rest of LinuxCNC.

The only other things you need to know to understand a HAL file that is part of a config is that [SECTION]ENTRY gets a value from the INI file (you can freely add your own sections, and ad your own entries to existing sections) and that the "net" command can be used to connect the output of one HAL function to the inputs of one or more other ones.

so:
net mysignal motion.spindle-speed-out
creates a HAL "signal" (which can have any name) to a LinuxCNC pin that sends spindle speed commands. (You won't have any motion pins in your command-line session, we haven't loaded the motion module)
net mysignal hm2_5i25.0.stepgen.04.velocity-cmd
connect the same signal to the spindle stepgen. You can combine them both on one line, if you want, or you can make the connections in separate files. Every "signal" can be connected to one "writer" (output pin) such as spindle-speed-out and as many "readers" (input pins) as required.
The following user(s) said Thank You: JohnPrime, Clive S, mooser

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

More
29 Jun 2016 01:44 #76771 by mooser
Thanks for that info.
I've been reading through the many pages I printed out (still a paper jockey where I can make notes) and looking at a few things.

First (I think) things first, lets start here

I printed the mesa file (mesaflash --device 5i25 --readhmid > mesa.txt) and see the two connectors (P2 internal and P3 external) making up the 34 possible "pins"
The P3 external connection (the one I need) has the various step/gen and step/dir combinations listed and a number which mesa calls Chan(nel) I'm guessing is the pair

Here's part of the one I currently have loaded

Configuration pin-out
IO Connections for P3
Pin# I/O Pri. func Sec. func Chan Pin func Pin Dir

1 0 IOPort None
14 1 IOPort StepGen 4 Step/Table1 (Out)
2 2 IOPort StepGen 0 Step/Table1 (Out)
15 3 IOPort None
3 4 IOPort StepGen 0 Dir/Table2 (Out)
16 5 IOPort StepGen 4 Dir/Table2 (Out)
4 6 IOPort StepGen 1 Step/Table1 (Out)
17 7 IOPort StepGen 5 Step/Table1 (Out)
5 8 IOPort StepGen 1 Dir/Table2 (Out)
6 9 IOPort StepGen 2 Step/Table1 (Out)
7 10 IOPort StepGen 2 Dir/Table2 (Out)
Etc

So
Physical pin #6 is mesa I/O #9 and it's set up as a step output
Physical pin #7 is mesa I/O #10 and it's set up as a dir output
Both of these are marked as chan #2 so I'm believing that's the step/dir pair mesa wants to use together

Same with Pin 4 (I/O#6) and pin 5 (I/O#8) are a Step & Dir pair on chan #1

(I have no idea what the table 1 table 2 etc means as there are multiple steps on table 1 etc)

Now on my lathe, using the C11G card, the X-axis is wired on pin 5 (dir) and pin 6 (step)
The mesa has pin 5 as a dir and 6 as a step but they are from different channels (5 as a dir on chan 1 and 6 is a step but on chan 2)

In the pncconf, I could only select the step function (X-axis step) on pin 6 (I/O 9) and it automatically picked pin 7 (I/O 10) for the step and wouldn't allow me to change it to pin 5 (I/O 8)

So my take on this is:
If I do not want to re-wire the C11G I would need to find and flash a bitfile that creates the same step & dir pairs as my C11G is currently wired for.

OR

Is the channel on the mesa card irrelevant and although pncconf will not allow odd pairing I can manually editing the HAL or INI or ??? and make different step/dir pairs ????

Thanks
M

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

More
29 Jun 2016 02:18 #76772 by PCW
The C11 bitfile is wired as the C11 manual (and the OPs chart below) suggests
You can change GPIO assignments in the hal file but hardware like stepgen pins are
bitfile specific

1 Spindle start (O)
2 X Step (Step)
3 X Dir (Step)
4 Y Step (Step)
5 Y Dir (Step)
6 Z Step (Step)
7 Z Dir (Step)
8 A Step (Step)
9 A Dir (Step)
10 E-Stop (I)
11 X Limit (I)
12 Y Limit (I)
13 Z Limit (I)
14 Spindle Step (Step)
15 Touch Plate (I)
16 Spindle Dir (Step)
17 Charge Pump (12.5 kHz) (Step)
(18 - 25 Ground)

pncconf does not know how to configure the C11 bitfile though could possible be taught with the correct XML

I think what was suggested was making a skeleton config with pncconf and then
adding the specialized options like the step/dir spindle control and chargepump by hand

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

More
29 Jun 2016 08:43 #76776 by andypugh

If I do not want to re-wire the C11G I would need to find and flash a bitfile

I would suggest that it is far easier to re-wire the C11G. (and, as PCW pointed out, the C11G manual suggests X step and X dir belong on pins 2 and 3.)

Is the channel on the mesa card irrelevant and although pncconf will not allow odd pairing I can manually editing the HAL or INI or ??? and make different step/dir pairs


No, the pairs are hard-coded as pairs. When the target is less than the current position the step pin of that channel will pulse, and the dir pin will be set to reverse and vice-versa.

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

More
29 Jun 2016 11:21 #76780 by mooser
The reason I was trying to avoid re-wiring is that it currently runs (under mach and a different computer) and is being used here and there as an actual lathe making bits and pieces. Based on my success rate with linuxcnc so far, it may well never work again :)

So at least my limited understanding of the meas / bitfile is correct in that the step/dir are pairs and must be used that way, therefor nothing will work (axis wise) until this is dealt with first.

I guess I 'll have to see about rewiring / configuring under mach first to keep the machine running and then have another go at linuxcnc
M

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

More
29 Jun 2016 11:41 #76782 by andypugh

I guess I 'll have to see about rewiring / configuring under mach first to keep the machine running and then have another go at linuxcnc


That might be the best approach. Then it is just a case of moving a cable between computers.

Re-configuring pins in Mach and moving wires on the breakout should only take 15 minutes or so.

Further down the line you might want to add a spindle encoder, but the C11G doesn't have enough input terminals for that.

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

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