<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.hardware.machctl.scm">
    <title>gmane.comp.hardware.machctl.scm</title>
    <link>http://blog.gmane.org/gmane.comp.hardware.machctl.scm</link>
    <description></description>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq><rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.hardware.machctl.scm/2"/>
 </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.hardware.machctl.scm/2">
    <title>machctl: r14 - sys</title>
    <link>http://permalink.gmane.org/gmane.comp.hardware.machctl.scm/2</link>
    <description>Author: vedge
Date: 2008-03-25 06:55:16 -0300 (Tue, 25 Mar 2008)
New Revision: 14

Added:
   sys/cnc.h
Log:
import missing file


Added: sys/cnc.h
===================================================================
--- sys/cnc.h                        (rev 0)
+++ sys/cnc.h2008-03-25 09:55:16 UTC (rev 14)
&lt; at &gt;&lt; at &gt; -0,0 +1,135 &lt; at &gt;&lt; at &gt;
+/*$OpenBSD$*/
+/*Public domain*/
+
+#ifndef _SYS_CNC_H_
+#define _SYS_CNC_H_
+
+#include &lt;sys/stdint.h&gt;
+
+#define CNC_BUF_SIZE1024/* size of instruction buffer */
+#define CNC_MAX_AXES3/* max axes (min. 1) */
+#define CNC_NAXESCNC_MAX_AXES
+#define CNC_MAX_SPINDLES2/* max spindles */
+#define CNC_MAX_ESTOPS13/* max e-stops/limit switches */
+
+enum cnc_axis {
+CNC_X, CNC_Y, CNC_Z,
+CNC_A, CNC_B, CNC_C
+};
+
+typedef uint64_t cnc_step_t;
+typedef int64_t cnc_pos_t;
+typedef int64_t cnc_time_t;
+
+enum cnc_insn_type {
+/* servo(4) operations */
+CNC_MOVE,/* coordinated move to given position */
+CNC_SET_INTERP,/* set interpolation mode */
+/* spindle(4) operations */
+CNC_SPINDLE_DIR,/* change current direction */
+CNC_SPINDLE_SPEED,/* set revolutions per minute */
+CNC_SPINDLE_START,/* start spindle rotation */
+CNC_SPINDLE_STOP,/* stop spindle rotation */
+/* atc(4) operations */
+CNC_ATC_PREPARE,/* prepare tool for next change */
+CNC_ATC_CHANGE,/* change tool in spindle */
+/* laser(4) operations */
+CNC_LASER_ON,/* TTL trigger high */
+CNC_LASER_OFF,/* TTL trigger low */
+CNC_LASER_CURRENT,/* set steady-state current */
+/* pickplace(4) operations */
+CNC_PICKPLACE_REEL,/* advance specified reel */
+CNC_PICKPLACE_SUCTION,/* enable suction cup vacuum */
+CNC_PICKPLACE_RELEASE,/* release suction cup vacuum */
+/* miscellaneous */
+CNC_PREEMPT,/* delay (with interrupts reenabled) */
+CNC_DWELL,/* precise delay (no interrupts) */
+CNC_COOL_MIST,/* toggle mist coolant */
+CNC_COOL_FLOOD,/* toggle flood or thru-tool coolant */
+CNC_COOL_VORTEX,/* toggle vortex tube */
+CNC_LAST_INSN
+};
+
+/* Mode of interpolation between coordinates */
+enum cnc_interp_mode {
+CNC_INTERP_LINEAR,/* linear interpolation */
+CNC_INTERP_LAST
+};
+
+/* Velocity curve generation algorithm */
+enum cnc_velocity_mode {
+CNC_VEL_BLENDED_SCURVE,/* blended s-curve (second-order) */
+CNC_VEL_SQUARED_SINE,/* squared sine (third-order) */
+};
+
+/* Position vector */
+typedef struct cnc_vector {
+cnc_pos_t v[CNC_NAXES];
+} cnc_vec_t;
+
+/*
+ * Kinematic limits. These values must be adjusted based on the physical
+ * limits of the motors and of the load they are driving.
+ */
+struct cnc_kinematics {
+int k_Ts;/* third-order jerk limit (ms) */
+int k_Vmax;/* maximum velocity (steps/sec) */
+};
+
+/* Program instruction */
+struct cnc_insn {
+enum cnc_insn_type i_type;
+union {
+struct {
+cnc_vec_t i_pos; /* relative target coords */
+u_long i_v0; /* minimum velocity (steps/s) */
+u_long i_F; /* maximum velocity (steps/s) */
+u_long i_Amax; /* max acceleration (steps/ms^2) */
+u_long i_Jmax; /* max jerk (steps/ms^3) */
+} i_move;
+struct {
+int i_id;/* name of spindle */
+int i_dir;/* 1=CW, -1=CCW */
+u_int i_speed;/* speed in RPM */
+} i_spindle;
+enum cnc_interp_mode i_interp_mode; /* for SET_INTERP */
+cnc_step_t i_delay;    /* for DWELL and PREEMPT */
+struct {
+int i_atc_id;/* name of ATC controller */
+int i_tool_idx;/* name of tool */
+int i_tgt_spindle;/* name of target spindle */
+} i_atc;
+int i_laser_current;/* for LASER_CURRENT */
+int i_pickplace_reel;/* for PICKPLACE_REEL */
+} i_arg;
+#define i_posi_arg.i_move.i_pos
+#define i_Fi_arg.i_move.i_F
+#define i_v0i_arg.i_move.i_v0
+#define i_Amaxi_arg.i_move.i_Amax
+#define i_Jmaxi_arg.i_move.i_Jmax
+#define i_interp_modei_arg.i_interp_mode
+#define i_spindle_idi_arg.i_spindle.i_id
+#define i_spindle_diri_arg.i_spindle.i_dir
+#define i_spindle_speedi_arg.i_spindle.i_speed
+#define i_delayi_arg.i_delay
+#define i_atc_idi_arg.i_atc.i_atc_id
+#define i_atc_tool_idxi_arg.i_atc.i_tool_idx
+#define i_atc_tgt_spindlei_arg.i_atc.i_tgt_spindle
+#define i_laser_currenti_arg.i_laser_current
+TAILQ_ENTRY(cnc_insn) prog;
+};
+
+#define CNC_EXECPROG_IO('C', 0)
+#define CNC_RESETPROG_IO('C', 1)
+#define CNC_GETPOS_IOR('C', 2, struct cnc_vector)
+#define CNC_SETPOS_IOWR('C', 3, struct cnc_vector)
+#define CNC_GETNSERVOS_IOR('C', 4, int)
+#define CNC_GETNSPINDLES_IOR('C', 5, int)
+#define CNC_GETKINLIMITS_IOR('C', 6, struct cnc_kinematics)
+#define CNC_SETKINLIMITS_IOWR('C', 7, struct cnc_kinematics)
+#define CNC_GETTIMEBASE_IOR('C', 8, u_long)
+#define CNC_SETTIMEBASE_IOWR('C', 9, u_long)
+#define CNC_CALTIMEBASE_IOWR('C', 10, u_long)
+#define CNC_GETNESTOPS_IOR('C', 11, int)
+
+#endif/* !_SYS_CNC_H_ */
</description>
    <dc:creator>MachCtl-SVN</dc:creator>
    <dc:date>2008-03-25T09:55:28</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.hardware.machctl.scm">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.hardware.machctl.scm</link>
  </textinput>
</rdf:RDF>
