Mesa Card Basics

More
09 Aug 2019 16:04 - 09 Aug 2019 16:09 #141789 by andypugh
Mesa Card Basics was created by andypugh
Mesa cards are add-on cards that offload the high-speed tasks to an FPGA.
The FPGA runs a firmware known as " Hostmot2 "
The interface between LinuxCNC and the card is in HAL, but at one level above that which you configure with the parallel port.
So, with a parallel port you connect motion to a stepgen, and then choose which physical pin to use for the step output, with a Mesa card you connect motion to a stepgen input pin on the FPGA interface, and the firmware on the card determines which physical pin is step and which direction.

A parallel port configuration which contained:
net x-pos joint.0.motor-pos-cmd => stepgen.0.position-cmd
net x-step stepgen.0.step => parport.0.pin-01-out
Would look like the following with a Mesa card:
net net x-pos joint.0.motor-pos-cmd => hm2_5i25.0.stepgen.00.position-cmd
Some cards load the firmware at every startup from the /lib/firmware directory. (5i20, 5i21, 7i43) whereas some have it permanently loaded and require it to be changed using the mesaflash tool
Mesaflash can tell you the physical pin allocation of the installed firmware, but finding a firmware with a specific pin allocation is more difficult. One way is to download the Hostmot2 source file from Mesa and to look through the .vhd files (which are just about human-readable)

Mesa FPGA cards can connect to LinuxCNC through PCI, PCIe , EPP parallel port ( 7i43 , 7i90 ), Ethernet and SPI ( Pi version ) interfaces.

Many FPGA cards can additionally connect to expansion cards using the Mesa "smart serial" interface via CAT5 cables.
Last edit: 09 Aug 2019 16:09 by andypugh.
The following user(s) said Thank You: BigJohnT, tommylight, Clive S, Dinuka_Shehan, podarok, helioz2000

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

More
09 Aug 2019 17:52 #141803 by pl7i92
Replied by pl7i92 on topic Mesa Card Basics
and on a ethernet upgrade like 7i92 to china mach 5axis bob
loadrt hm2_eth board_ip=192.168.1.121 config="num_stepgens=3, num_encoders=0, num_pwmgens=1"
setp   hm2_7i92.0.stepgen.00.dirsetup        [JOINT_0]DIRSETUP
setp   hm2_7i92.0.stepgen.00.dirhold         [JOINT_0]DIRHOLD
setp   hm2_7i92.0.stepgen.00.steplen         [JOINT_0]STEPLEN
setp   hm2_7i92.0.stepgen.00.stepspace       [JOINT_0]STEPSPACE
setp   hm2_7i92.0.stepgen.00.position-scale  [JOINT_0]STEP_SCALE
setp   hm2_7i92.0.stepgen.00.step_type        0
setp   hm2_7i92.0.stepgen.00.control-type     0
setp   hm2_7i92.0.stepgen.00.maxaccel        [JOINT_0]MAX_ACCELERATION
setp   hm2_7i92.0.stepgen.00.maxvel          [JOINT_0]MAX_VELOCITY

net x-pos-fb     joint.0.motor-pos-fb   <=  hm2_7i92.0.stepgen.00.position-fb
net x-pos-cmd    joint.0.motor-pos-cmd  =>  hm2_7i92.0.stepgen.00.position-cmd
net x-enable     joint.0.amp-enable-out =>  hm2_7i92.0.stepgen.00.enable

Attachments:
The following user(s) said Thank You: Dinuka_Shehan, Dorro1971

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

More
09 Apr 2021 17:12 #205447 by KcChris
Replied by KcChris on topic Mesa Card Basics
I'm wanting to switch to a mesa setup. Can help me understand a few things?
I'm a newbie and still trying to get my head wrapped around this.

(looking at 7i85 - 5i25 plug-n-go kit)
The 5i25 mesa board takes over control of stepgen? So now the latency of the pc doesn't matter?

Then the 7i85 for take care of sending signals to the stepper drives?

Also a side question, if running dual Y-axis motors, do I need a stepper driver for each or can I just wire the 2 motors together (step and direction)?

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

More
09 Apr 2021 17:28 - 09 Apr 2021 17:28 #205450 by andypugh
Replied by andypugh on topic Mesa Card Basics

The 5i25 mesa board takes over control of stepgen? So now the latency of the pc doesn't matter?


Yes, that's correct. There is an FPGA on the 5i25 that makes steps at very regular rate up to 10Mhz.
The rate is changed by the LinuxCNC serv-thread once every millisecond or so. A great deal of jitter in the millisecond timing can be tolerated as the actual position and step rate runs closed-loop inside LinuxCNC using a PID.

Then the 7i85 for take care of sending signals to the stepper drives?

The 7i85 is basically just IO pin protection and voltage conversion. The pins on the 5i25 are only safe to +5V (and something like -0.7) whereas the pins on the 7i85 are protected from -7 to +12V. It also adds handy screw terminals.
If your stepper drivers accept a differential signal then the 7i85S version is a better bet as that has differential line-drivers on board (much more noise tolerant)

Also a side question, if running dual Y-axis motors, do I need a stepper driver for each or can I just wire the 2 motors together (step and direction)?

You can wire two motors in series, or in parallel. Series guarantees the same current through both, and it probably the safer idea, but back-emf is doubled so for a given supply voltage the top speed will be lower.

But, it is probably better to use two stepper drivers. Then LinuxCNC can auto-square the gantry to separate home switches and overall control is likely to be better.
Last edit: 09 Apr 2021 17:28 by andypugh.

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

Moderators: PCWjmelson
Time to create page: 0.097 seconds
Powered by Kunena Forum