Advanced Search

Search Results (Searched for: )

  • Pinaz993
  • Pinaz993
Today 18:22 - Today 18:23

Usable Interface for CNC Turntable on Manual Mill

Category: Other User Interfaces

Wow! Lots of replies that I was hoping to receive an email about. >.> 

I'll admit, Arduino would absolutely be a better platform for this, considering the timing overhead of running the entire Linux kernal for the sake of a single stepper motor. That being said, (and at the risk of falling prey to sunk cost) I'd really like to use this as a jumping off point to using LinuxCNC for other stuff down the line. Also, I've got the Pi in hand, whereas I'll have to order an Uno clone to pivot on hardware. 

I'm also hoping to make the solution a black box that presents a web interface advertised to `turntable.local`, so that my uncle can control the thing from any device on the LAN. I'm pivoting from using the desktop interface because he's hoping to use a tablet to control the turntable. (Personally I think a touchscreen would be KISS, but I'm not going to argue with the 'customer'.)

Or enter G0 X-40 in the MDI for it to go to -40 degrees.

G0, huh? I think that might be my ticket in under the hood, assuming I can get the HAL config all figured out. I'm going to give that a go before I make another topic asking for help adapting a `STEPCONF` output.
  • Pinaz993
  • Pinaz993
Today 18:12
Replied by Pinaz993 on topic User name rpi-first-boot-wizard

User name rpi-first-boot-wizard

Category: Installing LinuxCNC

Can confirm: Rob fixed two issues that I had with the images before I even reported them. Don't be like me, folks, check to make sure the issue is still an issue in the latest image BEFORE you report it.
  • DerKlotz
  • DerKlotz
Today 16:21
Replied by DerKlotz on topic Error finishing read! Mesa 7i76e

Error finishing read! Mesa 7i76e

Category: Driver Boards

Itś all good now. Thanks
  • tommylight
  • tommylight's Avatar
Today 15:38
Replied by tommylight on topic Error finishing read! Mesa 7i76e

Error finishing read! Mesa 7i76e

Category: Driver Boards

1. USB-LAN adapters should not be used on production machines, USB has inherent latency issues
2. from your explanation it seems like interference issues, so is the machine and PC properly grounded?
  • DerKlotz
  • DerKlotz
Today 14:21 - Today 15:37
Error finishing read! Mesa 7i76e was created by DerKlotz

Error finishing read! Mesa 7i76e

Category: Driver Boards

Hello,
I get the error mentioned when a milling operation has run to completion or when I stop an operation with the stop button.
I have attached some pictures. My Mesa card is connected to a USB-LAN adapter.
Thank you very much for your help.

I just switched MESA connection from the USB-LAN adapter to the intern LAN adapter and the error is gone... the reason i didn´t take the intern LAN was my post monthś ago forum.linuxcnc.org/9-installing-linuxcnc...to-connect-to-github but now it also works.
  • jaro_p
  • jaro_p's Avatar
Today 13:41

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

Category: PnCConf Wizard

Ok mea culpa, SPI was not enabled. As an apology, after about the fourth OS change I forgot about it out of nervousness.
Thank you, I hope it will be without problems.
  • unknown
  • unknown
Today 12:51

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

Category: PnCConf Wizard

What RPi model are you using and what image are you using.

spi hasn't been enabled in config.txt
  • opw
  • opw
Today 12:13
Replied by opw on topic PoKeys57CNC HAL component

PoKeys57CNC HAL component

Category: HAL

This is very interesting. I recently purchased a Ozaki CNC lathe with mach3 control. I don't really liked the mach3 too much, but it worked well enough. Then my HDD crashed and this seemed to be a very good opportunity to go ahead and convert it to Linuxcnc...

But then, what about the used Pokeys 56U? Then I found this. Hope it connects with the 56U too, really good to find this.
  • RaspII
  • RaspII
Today 11:42 - Today 11:44

MESA 7i76EU - Pinzuordnung (z.B. Endschalter)

Category: Deutsch

ok, I made the sink configuration for output01 with setp now within custom.hal:
hm2_7i76e.0.7i76.0.0.output_source 0xFFFD
setp hm2_7i76e.0.7i76.0.0.output_sink 0x0002

-> works as expected, thanks a lot
  • jaro_p
  • jaro_p's Avatar
Today 11:20

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

Category: PnCConf Wizard

cnc@raspberrypi:~$ ls /dev/spidev*

ls: cannot access '/dev/spidev*': No such file or directory
  • unknown
  • unknown
  • Hakan
  • Hakan
Today 09:44 - Today 10:05

Ethercat compatible Encoder board tentative STM32F4 + LAN9252

Category: EtherCAT

Dc synchronization for the slave is at the same time very simple and complex.
Your slave is now running in free run mode. As fast and frequently as possible it executes the ecat_slv()
void loop(void)
{
  ecat_slv();
}
This function does the following
void ecat_slv(void)
{
  ecat_slv_poll();
  DIG_process(ESC_ALeventread(), DIG_PROCESS_WD_FLAG | DIG_PROCESS_OUTPUTS_FLAG |                                      DIG_PROCESS_APP_HOOK_FLAG | DIG_PROCESS_INPUTS_FLAG);
}
  
ecat_slv_poll() checks with the LAN9252 for events, mailboxes and other housekeeping things.
DIG_process() reads from the LAN9252 all pdos, sets user variables to the value of the pdos in cb_set_outputs(), calls a processing function if defined in application_hook, and finally captures user variables into pdos cb_get_inputs() and uploads them to the LAN9252. 
The data is then sent to the ethercat master with the next packet passing by.

In free-run this happens at the speed of the processor and one can expect the read value to have been read inside some 0-300 microseconds of the packet passing by. Sometime this is enough, sometimes not. For my plasma cutter it is definitely enough with a voltage reading every so often. For precise motion control this normally is not enough. Predictability of exactly when the value is read is important here.

That's where DC synchronization comes in. In DC sync the LAN9252 will tell you the exact reference time by setting the SYNC0 line high (or low).

That's all actually.

It is now up to you to do something useful with that signal.
There isn't one and only one way to handle this. For the stepper generator cards I have a somewhat elaborate time measurement built in and there is quite a bit of processing at every cycle when the target position changes.

In this case though I think it is as easy as it can be. Just read the encoder counter, store it in a value. Kick off the DIG_process are quickly as possible to have the data sent over to linuxcnc. Hal should have the read value next servo cycle.

To do this, set up an interrupt handler on the SYNC0 line and read the encoder value. Set a flag to start the DIG_process.

Start with the config structure
static esc_cfg_t config = {
.user_arg = NULL,
.use_interrupt = 0,
.watchdog_cnt = 150,
.set_defaults_hook = NULL,
.pre_state_change_hook = NULL,
.post_state_change_hook = NULL,
.application_hook = NULL,
.safeoutput_override = NULL,
.pre_object_download_hook = NULL,
.post_object_download_hook = NULL,
.rxpdo_override = NULL,
.txpdo_override = NULL,
.esc_hw_interrupt_enable = ESC_interrupt_enable,
.esc_hw_interrupt_disable = ESC_interrupt_disable,
.esc_hw_eep_handler = NULL,
.esc_check_dc_handler = dc_checker,
};
// Enable interrupts
void ESC_interrupt_enable(uint32_t mask)
{
  // Enable interrupt for SYNC0 or SM2 or SM3
  uint32_t user_int_mask =      ESCREG_ALEVENT_DC_SYNC0 | ESCREG_ALEVENT_SM2 | ESCREG_ALEVENT_SM3;
  if (mask & user_int_mask) {
    ESC_ALeventmaskwrite(ESC_ALeventmaskread() | (mask & user_int_mask));
    ESC_ALeventmaskwrite(ESC_ALeventmaskread() &
                         ~(ESCREG_ALEVENT_DC_SYNC0 | ESCREG_ALEVENT_SM3));
    attachInterrupt(digitalPinToInterrupt(SYNC0), sync0Handler, RISING);

    // Set LAN9252 interrupt pin driver as push-pull active high
    uint32_t bits = 0x00000111;
    ESC_write(0x54, &bits, 4);

    // Enable LAN9252 interrupt
    bits = 0x00000001;
    ESC_write(0x5c, &bits, 4);
  }
}
// Disable interrupts
void ESC_interrupt_disable(uint32_t mask)
{
  // Enable interrupt for SYNC0 or SM2 or SM3
  uint32_t user_int_mask =      ESCREG_ALEVENT_DC_SYNC0 | ESCREG_ALEVENT_SM2 | ESCREG_ALEVENT_SM3;
  if (mask & user_int_mask) {    // Disable interrupt from SYNC0 etc
    ESC_ALeventmaskwrite(ESC_ALeventmaskread() & ~(mask & user_int_mask));
    detachInterrupt(digitalPinToInterrupt(SYNC0));
    // Disable LAN9252 interrupt
    uint32_t bits = 0x00000000;
    ESC_write(0x5c, &bits, 4);
  }
}
// Setup of DC
uint16_t dc_checker(void)
{
  // Indicate we run DC
  ESCvar.dcsync = 1;
  return 0;
}
void sync0Handler(void)
{
  ALEventIRQ = ESC_ALeventread();
  serveIRQ = 1;
  encoderCounter = <read encoder counter value here>;
}
void loop(void)
{
  uint64_t dTime;
  if (serveIRQ) {
    DIG_process(DIG_PROCESS_WD_FLAG | DIG_PROCESS_OUTPUTS_FLAG |
                DIG_PROCESS_APP_HOOK_FLAG | DIG_PROCESS_INPUTS_FLAG);
    serveIRQ = 0;
    ESCvar.PrevTime = ESCvar.Time;
    ecat_slv_poll();
  }
  dTime = longTime.extendTime(micros()) - irqTime;
  if (dTime > 5000)  // Don't run ecat_slv_poll when expecting to serve interrupt
    ecat_slv();
 }

So there are many changes. Make good use of git so you can come back.
In loop() I have tried to make it work with both Dc sync and free run by waiting for 5 cycles without sync0 interrupts and then start polling.

You can find this code in E3000 main.cpp that's where I copied it from.
 
  • RotarySMP
  • RotarySMP's Avatar
Today 09:31

Considering a Full Rewire on a Working Schaublin 125 CNC

Category: Turning

Wow, you hit the ground running on this one Martin. Great progress.

I also thought my cabinet had lots of space... until I mounted everything and started wiring it up. Ended up having to stack a relay board (soon to be replaced by the second 7i84) above the 7i92 as I ran out of space. I guess I have taken a lot of space with the spindle VFD, pre and post filters and brake module.
  • jaro_p
  • jaro_p's Avatar
Today 09:15

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

Category: PnCConf Wizard

Unfortunately, the situation is anything but simple… I reinstalled Bookworm, but the command:
`sudo mesaflash --spi --addr /dev/spidev0.0 --device 7c81 --readhmid`

doesn't work:

- open: No such file or directory
- No 7C81 board found

The following works:

`halcmd -kf`

`halcmd: loadrt hostmot2`

`halcmd: loadrt hm2_rpspi`

`halcmd: show all hm2`

However, I don't know how to write a new bitfile. That is, the equivalent of:

`sudo mesaflash --spi --addr /dev/spidev0.0 --device 7c81 --fallback --write bitfile-name`

I tried installing an older version of LinuxCNC – Buster. However, the libraries for installing mesaflash are missing and cannot be installed because the repositories for this version no longer exist.
  • Hakan
  • Hakan
Today 09:04

Ethercat compatible Encoder board tentative STM32F4 + LAN9252

Category: EtherCAT

You can drown in documentation here github.com/linuxcnc-ethercat/linuxcnc-ethercat

But you should treat is any new EtherCAT board, no-one knows you made it.
lcec_configgen
usually gives a good starting point. And then you add pdos and sdos 
as you progress with the project. The naming/numbering scheme is pretty obvious when you see one.

Some general items you should have is 
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="1000" syncToRefClock="True">
or if syncToRefClock isn't recognized
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="-1000">
That "1000" is how frequent the clocks in the DC slaves are synchronized by the master. I use every 1000 cycle ( 1 sec)
In between the slaves calculate drift and offset themselves and run pretty darn accurate so it isn't necessary to do it more often than that. I Haven't seen a penalty for too seldom or too often so the important thing it's there.

And when you use DC sync for the slave, which you soon can do, you add this line to the slave.
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
300 is the important, means DC synchronization. 000 means free-run, as does removing the dcConf statetment, and 200 means SM2 synchronization. Those are the common modes, there are also 700, 100 and other modes, but the manual or the ESI file will tell you. 

 
Displaying 1 - 15 out of 280886 results.
Time to create page: 1.951 seconds
Powered by Kunena Forum