gmoccapy

More
27 Jul 2015 02:34 #60940 by thor44
Replied by thor44 on topic gmoccapy
Yes I'm using the SIM example.

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

More
27 Jul 2015 06:21 #60943 by thor44
Replied by thor44 on topic gmoccapy
I reviewed all of the files and did not find anything about the parallel port pin outs, unless they are written differently?
Are they missing because it is a simulation?

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

More
27 Jul 2015 14:37 #60950 by cmorley
Replied by cmorley on topic gmoccapy
yes because its a simulation.

Chris M

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

More
29 Jul 2015 21:03 - 29 Jul 2015 21:15 #61015 by thor44
Replied by thor44 on topic gmoccapy
I have working Axis config file and I copied and pasted from HAL file the parallel port pin assignments into the core_sim.hal file hoping that it would make the difference but no dice.

Does anyone have an idea on how to get a gmoccapy sim config to work work the machine?
Here is the file.
# core HAL config file for simulation

# first load all the RT modules that will be needed
# kinematics
loadrt trivkins
# motion controller, get name and thread periods from ini file
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt probe_parport
loadrt hal_parport cfg="0x378 out"
setp parport.0.reset-time 5000
loadrt stepgen step_type=0,0,0
# load 6 differentiators (for velocity and accel signals
loadrt ddt names=ddt_x,ddt_xv,ddt_y,ddt_yv,ddt_z,ddt_zv
# load additional blocks
loadrt hypot names=vel_xy,vel_xyz

# add motion controller functions to servo thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
# link the differentiator functions into the code
addf ddt_x servo-thread
addf ddt_xv servo-thread
addf ddt_y servo-thread
addf ddt_yv servo-thread
addf ddt_z servo-thread
addf ddt_zv servo-thread
addf vel_xy servo-thread
addf vel_xyz servo-thread

net probe-in => motion.probe-input

net estop-out => parport.0.pin-01-out
setp parport.0.pin-02-out-invert 1
net ydir => parport.0.pin-02-out
net ystep => parport.0.pin-03-out
setp parport.0.pin-03-out-reset 1
net zdir => parport.0.pin-04-out
net zstep => parport.0.pin-05-out
setp parport.0.pin-05-out-reset 1
setp parport.0.pin-06-out-invert 1
net xdir => parport.0.pin-06-out
net xstep => parport.0.pin-07-out
setp parport.0.pin-07-out-reset 1
net adir => parport.0.pin-08-out
net astep => parport.0.pin-09-out
setp parport.0.pin-09-out-reset 1
net spindle-cw => parport.0.pin-14-out
net spindle-pwm => parport.0.pin-16-out
net xenable => parport.0.pin-17-out
net home-x <= parport.0.pin-12-in-not
net probe-in <= parport.0.pin-13-in
net home-y <= parport.0.pin-15-in-not


# create HAL signals for position commands from motion module
# loop position commands back to motion module feedback
net Xpos axis.0.motor-pos-cmd => axis.0.motor-pos-fb ddt_x.in
net Ypos axis.1.motor-pos-cmd => axis.1.motor-pos-fb ddt_y.in
net Zpos axis.2.motor-pos-cmd => axis.2.motor-pos-fb ddt_z.in

# send the position commands thru differentiators to
# generate velocity and accel signals
net Xvel ddt_x.out => ddt_xv.in vel_xy.in0
net Xacc <= ddt_xv.out
net Yvel ddt_y.out => ddt_yv.in vel_xy.in1
net Yacc <= ddt_yv.out
net Zvel ddt_z.out => ddt_zv.in vel_xyz.in0
net Zacc <= ddt_zv.out

# Cartesian 2- and 3-axis velocities
net XYvel vel_xy.out => vel_xyz.in1
net XYZvel <= vel_xyz.out

# estop loopback
net estop-loop iocontrol.0.user-enable-out iocontrol.0.emc-enable-in

# create signals for tool loading loopback
net tool-prep-loop iocontrol.0.tool-prepare iocontrol.0.tool-prepared
net tool-change-loop iocontrol.0.tool-change iocontrol.0.tool-changed
Last edit: 29 Jul 2015 21:15 by thor44.

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

More
30 Jul 2015 03:29 #61025 by newbynobi
Replied by newbynobi on topic gmoccapy
Just take a copy of your working config and change the ini file as described in the documentation of gmoccapy, brginning from 4.1

Norbert

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

Moderators: newbynobiHansU
Time to create page: 0.087 seconds
Powered by Kunena Forum