ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board

More
25 Jan 2023 21:55 #262907 by TOLP2

Welcome to the club. Good to hear it works, gives me a boost to go on with developing. 
The following user(s) said Thank You: tommylight

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

More
26 Jan 2023 08:15 #262923 by deroj
Yes. It feels great :cheer:
One question for the 5A-75B examples. The encoders have no Z Input.
Because the hardware cannot handle this?
For the 75E you have encoders with A/B/Z.
Because I will need Z...

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

More
27 Jan 2023 02:23 #262971 by wuyatom
  Now there is a new problem
Attachments:

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

More
27 Jan 2023 07:42 #262984 by TOLP2

Yes. It feels great :cheer:
One question for the 5A-75B examples. The encoders have no Z Input.
Because the hardware cannot handle this?
For the 75E you have encoders with A/B/Z.
Because I will need Z...

It is perfectly possible to use the ABZ encoders on the 75A. It's just an example, you can change it to your needs. 

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

More
27 Jan 2023 07:47 #262986 by TOLP2

  Now there is a new problem
 

​​​​​​The total length of any pin name cannot exceed 80 characters in LinuxCNC. This name is longer and therefore gets truncated, therefore the original (too long) name does not exists. 

To solve, try to limit your board name to 16 characters or less. 
The following user(s) said Thank You: wuyatom

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

More
27 Jan 2023 12:22 #262998 by wuyatom
Can you send your hal and ini files for my reference

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

More
27 Jan 2023 12:26 - 27 Jan 2023 12:28 #263001 by wuyatom
  My emergency stop button can't be pressed
Attachments:
Last edit: 27 Jan 2023 12:28 by wuyatom.

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

More
27 Jan 2023 12:30 #263003 by wuyatom
        loadrt [KINS]KINEMATICS
        loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
        loadrt litexcnc
        loadrt litexcnc_eth config_file="[LITEXCNC]CONFIG_FILE"
        loadrt pos2vel number=6
        loadusr -W hal_manualtoolchange
        
        # Add the functions to the thread
        addf [LITEXCNC](NAME).read servo-thread
        addf motion-command-handler servo-thread
        addf motion-controller servo-thread
        addf pos2vel.convert servo-thread
        addf [LITEXCNC](NAME).write servo-thread
        
        ########################################################################
        #STEPGEN
        ########################################################################
        # - timings (prevent re-calculation)
        net pos2vel.period-s       <= [LITEXCNC](NAME).stepgen.period-s
        net pos2vel.period-s-recip <= [LITEXCNC](NAME).stepgen.period-s-recip
        
        #STEPGEN - X-AXIS
        ########################################################################
        # POS2VEL
        # - position control
        net xpos-fb  <= [LITEXCNC](NAME).stepgen.00.position_prediction
        net xpos-fb  => joint.0.motor-pos-fb
        net xpos-fb  => pos2vel.0.position-feedback
        net xvel-fb  pos2vel.0.velocity-feedback <= [LITEXCNC](NAME).stepgen.00.velocity-prediction
        net xpos-cmd pos2vel.0.position-cmd      <= joint.0.motor-pos-cmd
        # - settings
        setp pos2vel.0.max-acceleration [JOINT_0]STEPGEN_MAXACCEL
        # setp pos2vel.0.debug 1
        
        # STEPGEN
        # - Setup of timings
        setp [LITEXCNC](NAME).stepgen.00.position-scale   [JOINT_0]SCALE
        setp [LITEXCNC](NAME).stepgen.00.steplen          5000
        setp [LITEXCNC](NAME).stepgen.00.stepspace        5000
        setp [LITEXCNC](NAME).stepgen.00.dir-hold-time    10000
        setp [LITEXCNC](NAME).stepgen.00.dir-setup-time   10000
        setp [LITEXCNC](NAME).stepgen.00.max-velocity     [JOINT_0]MAX_VELOCITY
        setp [LITEXCNC](NAME).stepgen.00.max-acceleration [JOINT_0]STEPGEN_MAXACCEL
        # setp [LITEXCNC](NAME).stepgen.00.debug 1
        # - Connect velocity command
        net xvel_cmd pos2vel.0.velocity-cmd => [LITEXCNC](NAME).stepgen.00.velocity-cmd
        # - Set the acceleration to be used (NOTE: pos2vel has fixed acceleration)
        setp [LITEXCNC](NAME).stepgen.00.acceleration-cmd [JOINT_0]STEPGEN_MAXACCEL
        # - enable the drive
        net xenable joint.0.amp-enable-out => [LITEXCNC](NAME).stepgen.00.enable
        
        #STEPGEN - Y-AXIS
        ########################################################################
        # POS2VEL
        # - position control
        net ypos-fb  <= [LITEXCNC](NAME).stepgen.01.position_prediction
        net ypos-fb  => joint.1.motor-pos-fb
        net ypos-fb  => pos2vel.1.position-feedback
        net yvel-fb  pos2vel.1.velocity-feedback <= [LITEXCNC](NAME).stepgen.01.velocity-prediction
        net ypos-cmd pos2vel.1.position-cmd      <= joint.1.motor-pos-cmd
        # - settings
        setp pos2vel.1.max-acceleration [JOINT_1]STEPGEN_MAXACCEL
        # setp pos2vel.0.debug 1
        
        # STEPGEN
        # - Setup of timings
        setp [LITEXCNC](NAME).stepgen.01.position-scale   [JOINT_1]SCALE
        setp [LITEXCNC](NAME).stepgen.01.steplen          5000
        setp [LITEXCNC](NAME).stepgen.01.stepspace        5000
        setp [LITEXCNC](NAME).stepgen.01.dir-hold-time    10000
        setp [LITEXCNC](NAME).stepgen.01.dir-setup-time   10000
        setp [LITEXCNC](NAME).stepgen.01.max-velocity     [JOINT_1]MAX_VELOCITY
        setp [LITEXCNC](NAME).stepgen.01.max-acceleration [JOINT_1]STEPGEN_MAXACCEL
        # setp [LITEXCNC](NAME).stepgen.00.debug 1
        # - Connect velocity command
        net yvel_cmd pos2vel.1.velocity-cmd => [LITEXCNC](NAME).stepgen.01.velocity-cmd
        # - Set the acceleration to be used (NOTE: pos2vel has fixed acceleration)
        setp [LITEXCNC](NAME).stepgen.01.acceleration-cmd [JOINT_1]STEPGEN_MAXACCEL
        # - enable the drive
        net yenable joint.1.amp-enable-out => [LITEXCNC](NAME).stepgen.01.enable
        
        #//////////////////////////////////////////////////////////////////////////////
        #STEPGEN - Z-AXIS
        ########################################################################
        # POS2VEL
        # - position control
        net zpos-fb  <= [LITEXCNC](NAME).stepgen.02.position_prediction
        net zpos-fb  => joint.2.motor-pos-fb
        net zpos-fb  => pos2vel.2.position-feedback
        net zvel-fb  pos2vel.2.velocity-feedback <= [LITEXCNC](NAME).stepgen.02.velocity-prediction
        net zpos-cmd pos2vel.2.position-cmd      <= joint.2.motor-pos-cmd
        # - settings
        setp pos2vel.2.max-acceleration [JOINT_2]STEPGEN_MAXACCEL
        # setp pos2vel.0.debug 1
        
        # STEPGEN
        # - Setup of timings
        setp [LITEXCNC](NAME).stepgen.02.position-scale   [JOINT_2]SCALE
        setp [LITEXCNC](NAME).stepgen.02.steplen          5000
        setp [LITEXCNC](NAME).stepgen.02.stepspace        5000
        setp [LITEXCNC](NAME).stepgen.02.dir-hold-time    10000
        setp [LITEXCNC](NAME).stepgen.02.dir-setup-time   10000
        setp [LITEXCNC](NAME).stepgen.02.max-velocity     [JOINT_2]MAX_VELOCITY
        setp [LITEXCNC](NAME).stepgen.02.max-acceleration [JOINT_2]STEPGEN_MAXACCEL
        # setp [LITEXCNC](NAME).stepgen.00.debug 1
        # - Connect velocity command
        net zvel_cmd pos2vel.2.velocity-cmd => [LITEXCNC](NAME).stepgen.02.velocity-cmd
        # - Set the acceleration to be used (NOTE: pos2vel has fixed acceleration)
        setp [LITEXCNC](NAME).stepgen.02.acceleration-cmd [JOINT_2]STEPGEN_MAXACCEL
        # - enable the drive
        net zenable joint.2.amp-enable-out => [LITEXCNC](NAME).stepgen.02.enable
        
        #net estop-out  =>     [LITEXCNC](NAME).gpio.j1:8.out
        
        # toolchange setup
        net tool-change  iocontrol.0.tool-change =>      hal_manualtoolchange.change
        net tool-changed iocontrol.0.tool-changed =>     hal_manualtoolchange.changed
        net tool-number  iocontrol.0.tool-prep-number => hal_manualtoolchange.number
        net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
        
        
        
        
        
 

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

More
27 Jan 2023 17:24 #263016 by deroj
To find out you can open terminal and run "halrun".
then load the two modules with
loadrt litexcnc
loadrt litexcnc_eth config_file="/path/to/config.json"

after successfully loaded type
show pin

which gives you a list of all pins and their names

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

More
27 Jan 2023 22:11 #263029 by TOLP2
@wuyatom: please clarify what you mean with 'cannot press E-Stop'. Is this in the GUI, or is it a physical button?

In case of the GUI: I cannot help you as you are using Axis and I use GMOCCAPY.

If it is a physical button. In the HAL file you posted I don't see any input defined for the E-stop. If you have an input assigned to the E-Stop and it is still not running, please verify you've modified the buffers. The default buffers are output only!

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

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