[simpits-tech] EPIC programming

Mark Doran simpits-tech@simpits.org
Wed, 11 Dec 2002 22:54:51 -0800


This is a multi-part message in MIME format.

------=_NextPart_000_0019_01C2A168.545EE0D0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit

Hi Dave:
 
I'd definitely grab a copy of the newer EPICenter package from
www.flightlink.com <http://www.flightlink.com/>  download section.  The
"syntax.doc" file that comes as part of that download is far more
helpful for programming the EPIC USB than the old ISA docs (my EPIC USB
was one of the early ones and came with the old gray covered ISA EPIC
book; perhaps it's that one that you have).
 
I assume that you've figured out the wiring on the EMDA card and
therefore know the Mod/Row address of the databits that you have wired
up.  For the sake of argument, I'll assume that you have wired Mod 1 Row
0 and that Mod 0 contains no data bits.
 
Your EPL file might go something like this (I haven't compiled this so
there may be bugs but this should give you the gist, I hope):
 
-- start example
 
// define Mod 1 Row 0 as the only row of databits and set it to be
scanned at the highest
// rate available.
 
#define HIGHPRIORITY 0
 
definemodule(1, HIGHPRIORITY, 0, 1)
 
connector(FIRSTEXPANSIONMODULE)
{
  modrow(1, 0);  // associate Mod 1 Row 0 with a connector label
};
 
// now define a device structure so we can name the databits to use in
EPL code
 
device(dMyPanel)
{
  connector(FIRSTEXPANSIONMODULE);  // data bits in MyPanel are on the
connector
 
  // here's the tricky part.the first argument of the "button" statement
is the
  // number that represents the n'th modrow entry in the connector
structure above
  // and like all EPIC things, count starts at zero so in this case as
we only have
  // one row, it's the zero-th entry in the connector structure.  If the
selected
  // row number in the structure above were say 7 instead, you would
still put a
  // 0 here since it would still be the zero-th entry in the connector
structure.
  // Strange but true ;-)
 
  button(0, 0, bOne);  
  button(0, 1, bTwo);
  button(0, 2, bThree);
  button(0, 3, bFour);
  button(0, 4, bFive);
  button(0, 5, bSix);
  button(0, 6, bSeven);
  button(0, 7, bEight);
};
 
// now write the EPL code to do something when a databit changes state
 
// e.g. #1: a toggle switch that types a message when flipped to on but
does
// nothing when you turn it off again.
 
void dMyPanel.bOne.On(void)
{
  keyhit(S W I T C H SPACE O N E ENTER);
}
 
// e.g. #2: a push button that sends press and release of a keystroke
// with the on and off transitions
 
void dMyPanel.bTwo.On(void)
{
  keypress(P);  // "make" of P
}
 
// P key is held until you release switch on M1R0B2 when this code will
run:
 
void dMyPanel.bTwo.Off(void)
{
  keyrelease(P);  // "break" of P
}
 
// and so on for all the other buttons.
 
-- end example
 
Hope that helps get you started.
 
There is no need to plug in an analog joystick to the EPIC if you don't
need or want to do that.  The reason that you might want to is if you
plan to integrate code in your EPL files to define how the joystick
buttons work and/or because you want to read the analog axis positions
from your EPL file and do something appropriate with that.  For example,
in our cockpit project we map the Falcon4 "idle detent" keystroke to be
triggered when the throttle axis value drops as a result of manhandling
the throttle handle past the idle cutoff gate/stop.  You can't really do
that too easily with an analog axis that isn't connected via the EPIC.
But then you may not need to do something as involved as all that either
;-)
 
[btw, syntax notes: there's no significance to the leading lower case
letter I use on names.I just use d<something> for devices and
b<something> for buttons so I can see what I'm manipulating in the
code.sort of a Hungarian naming thing.  Case is significant for the .On
and .Off routine name suffixes though]
 
Cheers,
 
Mark.
 
 
-----Original Message-----
From: simpits-tech-admin@simpits.org
[mailto:simpits-tech-admin@simpits.org] On Behalf Of Dave Hensley
Sent: Wednesday, December 11, 2002 2:42 PM
To: simpits-tech@simpits.org
Subject: [simpits-tech] EPIC programming
 
Hey guys,
 
I hope everyone is doing well with the holidays approaching. :-)
 
I have a question on programming an EPIC setup. This may qualify as
"hand-holding" but I need help getting started with this thing. The docs
I have don't help me and they also seem to be focused on the ISA EPIC
and pre-Epicenter software. I have the USB EPIC card with one expansion
card, and one EMDA card. Initially I will only be using pushbuttons and
toggle switches with the card. What would I need in the EPL file to
initialize one row of switches connected to the EMDA?
 
Also, I have a USB joystick. Do I still need an analog stick connected
to the expansion card for everything to work correctly? I feel that this
should not be this complicated, but none of the attempts I have made
have worked. If someone has a similar setup and could send me a small
example of a EPL -or- if someone is willing to right a small EPL program
that shows how I define the EMDA card, it would mean a lot. 
 
Sorry to pester the group with this, but if I can just understand how to
start programming this thing, I think I can eventually figure it out. 
 
Thanks!!
 
Dave

------=_NextPart_000_0019_01C2A168.545EE0D0
Content-Type: text/html;
	charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">


<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 10">
<meta name=3DOriginator content=3D"Microsoft Word 10">
<link rel=3DFile-List href=3D"cid:filelist.xml@01C2A168.4FC81AA0">
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"time"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"date"/>
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;
	mso-font-charset:2;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:0 268435456 0 0 -2147483648 0;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:1627421319 -2147483648 8 0 66047 0;}
@font-face
	{font-family:"Lucida Console";
	panose-1:2 11 6 9 4 5 4 2 2 4;
	mso-font-charset:0;
	mso-generic-font-family:modern;
	mso-font-pitch:fixed;
	mso-font-signature:-2147482993 6144 0 0 31 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;
	text-underline:single;}
span.EmailStyle17
	{mso-style-type:personal-reply;
	mso-style-noshow:yes;
	mso-ansi-font-size:10.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:"Lucida Console";
	mso-ascii-font-family:"Lucida Console";
	mso-hansi-font-family:"Lucida Console";
	color:blue;
	font-weight:normal;
	font-style:normal;
	text-decoration:none;
	text-underline:none;
	text-decoration:none;
	text-line-through:none;}
span.SpellE
	{mso-style-name:"";
	mso-spl-e:yes;}
span.GramE
	{mso-style-name:"";
	mso-gram-e:yes;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
 /* List Definitions */
 @list l0
	{mso-list-id:989794388;
	mso-list-type:hybrid;
	mso-list-template-ids:-1159971666 1743838664 67698691 67698693 67698689 =
67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
	{mso-level-start-at:0;
	mso-level-number-format:bullet;
	mso-level-text:\F06E;
	mso-level-tab-stop:.5in;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:Wingdings;
	mso-fareast-font-family:"Times New Roman";
	mso-bidi-font-family:"Times New Roman";}
@list l1
	{mso-list-id:1146625428;
	mso-list-type:hybrid;
	mso-list-template-ids:-1879380174 156274286 67698691 67698693 67698689 =
67698691 67698693 67698689 67698691 67698693;}
@list l1:level1
	{mso-level-start-at:0;
	mso-level-number-format:bullet;
	mso-level-text:\F06E;
	mso-level-tab-stop:.5in;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:Wingdings;
	mso-fareast-font-family:"Times New Roman";
	mso-bidi-font-family:"Times New Roman";}
@list l2
	{mso-list-id:1370566273;
	mso-list-type:hybrid;
	mso-list-template-ids:-791654250 -345625984 67698691 67698693 67698689 =
67698691 67698693 67698689 67698691 67698693;}
@list l2:level1
	{mso-level-start-at:0;
	mso-level-number-format:bullet;
	mso-level-text:\F06E;
	mso-level-tab-stop:.5in;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:Wingdings;
	mso-fareast-font-family:"Times New Roman";
	mso-bidi-font-family:"Times New Roman";}
ol
	{margin-bottom:0in;}
ul
	{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */=20
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:"";
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin:0in;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman";}
</style>
<![endif]--><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext=3D"edit">
  <o:idmap v:ext=3D"edit" data=3D"1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body bgcolor=3Dwhite lang=3DEN-US link=3Dblue vlink=3Dpurple =
style=3D'tab-interval:.5in'>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'>Hi =
Dave:<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'>I&#8217;d
definitely grab a copy of the newer <span =
class=3DSpellE>EPICenter</span> package
from <a href=3D"http://www.flightlink.com/">www.flightlink.com</a> =
download
section.<span style=3D'mso-spacerun:yes'>&nbsp; </span>The =
&#8220;syntax.doc&#8221;
file that comes as part of that download is far more helpful for =
programming the
EPIC USB than the old ISA docs (my EPIC USB was one of the early ones =
and came
with the old gray covered ISA EPIC book; perhaps it&#8217;s that one =
that you
have).<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'>I =
assume that
you&#8217;ve figured out the wiring on the EMDA card and therefore know =
the
Mod/Row address of the <span class=3DSpellE>databits</span> that you =
have wired
up.<span style=3D'mso-spacerun:yes'>&nbsp; </span>For the sake of =
argument, I&#8217;ll
assume that you have wired Mod 1 Row 0 and that Mod 0 contains no data =
bits.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'>Your =
EPL file might
go something like this (I haven&#8217;t compiled this so there may be =
bugs but
this should give you the gist, I hope):<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal style=3D'margin-left:5.25pt'><font size=3D2 =
color=3Dblue
face=3D"Lucida Console"><span =
style=3D'font-size:10.0pt;font-family:"Lucida Console";
color:blue'>-- <span class=3DGramE>start</span> =
example<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'>// =
define Mod
1 Row 0 as the only row of <span class=3DSpellE>databits</span> and set =
it to be
scanned at the highest<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'>// =
rate
available.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'>#define
HIGHPRIORITY 0<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><span class=3DSpellE><span class=3DGramE><font =
size=3D2
color=3Dblue face=3D"Lucida Console"><span =
style=3D'font-size:10.0pt;font-family:
"Lucida =
Console";color:blue'>definemodule</span></font></span></span><span
class=3DGramE><font size=3D2 color=3Dblue face=3D"Lucida Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'>(</span></font></span><font
size=3D2 color=3Dblue face=3D"Lucida Console"><span =
style=3D'font-size:10.0pt;
font-family:"Lucida Console";color:blue'>1, HIGHPRIORITY, 0, =
1)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><span class=3DGramE><font size=3D2 color=3Dblue
face=3D"Lucida Console"><span =
style=3D'font-size:10.0pt;font-family:"Lucida Console";
color:blue'>connector(</span></font></span><font size=3D2 color=3Dblue
face=3D"Lucida Console"><span =
style=3D'font-size:10.0pt;font-family:"Lucida Console";
color:blue'>FIRSTEXPANSIONMODULE)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'>{<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'><span
style=3D'mso-spacerun:yes'>&nbsp; </span><span class=3DSpellE><span =
class=3DGramE>modrow</span></span><span
class=3DGramE>(</span>1, 0);<span style=3D'mso-spacerun:yes'>&nbsp; =
</span>// associate
Mod 1 Row 0 with a connector label<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'>};<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'>// =
now define
a device structure so we can name the <span =
class=3DSpellE>databits</span> to use
in EPL code<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><span class=3DGramE><font size=3D2 color=3Dblue
face=3D"Lucida Console"><span =
style=3D'font-size:10.0pt;font-family:"Lucida Console";
color:blue'>device(</span></font></span><span class=3DSpellE><font =
size=3D2
color=3Dblue face=3D"Lucida Console"><span =
style=3D'font-size:10.0pt;font-family:
"Lucida Console";color:blue'>dMyPanel</span></font></span><font size=3D2
color=3Dblue face=3D"Lucida Console"><span =
style=3D'font-size:10.0pt;font-family:
"Lucida Console";color:blue'>)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'>{<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'><span
style=3D'mso-spacerun:yes'>&nbsp; </span><span =
class=3DGramE>connector(</span>FIRSTEXPANSIONMODULE);<span
style=3D'mso-spacerun:yes'>&nbsp; </span>// data bits in <span =
class=3DSpellE>MyPanel</span>
are on the connector<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'><span
style=3D'mso-spacerun:yes'>&nbsp; </span>// here&#8217;s the tricky =
part&#8230;the
first argument of the &#8220;button&#8221; statement is =
the<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'><span
style=3D'mso-spacerun:yes'>&nbsp; </span>// number that represents the =
<span
class=3DSpellE>n&#8217;th</span> <span class=3DSpellE>modrow</span> =
entry in the
connector structure above<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'><span
style=3D'mso-spacerun:yes'>&nbsp; </span>// and like all EPIC things, =
count
starts at zero so in this case as we only =
have<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'><span
style=3D'mso-spacerun:yes'>&nbsp; </span>// one row, it&#8217;s the =
zero-<span
class=3DSpellE>th</span> entry in the connector structure.<span
style=3D'mso-spacerun:yes'>&nbsp; </span>If the =
selected<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'><span
style=3D'mso-spacerun:yes'>&nbsp; </span>// row number in the structure =
above
were say 7 instead, you would still put a<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'><span
style=3D'mso-spacerun:yes'>&nbsp; </span>// 0 here since it would still =
be the
zero-<span class=3DSpellE>th</span> entry in the connector =
structure.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'><span
style=3D'mso-spacerun:yes'>&nbsp; </span>// <span =
class=3DGramE>Strange</span> but
true ;-)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'><span
style=3D'mso-spacerun:yes'>&nbsp; </span><span =
class=3DGramE>button(</span>0, 0, <span
class=3DSpellE>bOne</span>);<span style=3D'mso-spacerun:yes'>&nbsp; =
</span><o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'><span
style=3D'mso-spacerun:yes'>&nbsp; </span><span =
class=3DGramE>button(</span>0, 1, <span
class=3DSpellE>bTwo</span>);<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'><span
style=3D'mso-spacerun:yes'>&nbsp; </span><span =
class=3DGramE>button(</span>0, 2, <span
class=3DSpellE>bThree</span>);<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'><span
style=3D'mso-spacerun:yes'>&nbsp; </span><span =
class=3DGramE>button(</span>0, 3, <span
class=3DSpellE>bFour</span>);<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'><span
style=3D'mso-spacerun:yes'>&nbsp; </span><span =
class=3DGramE>button(</span>0, 4, <span
class=3DSpellE>bFive</span>);<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'><span
style=3D'mso-spacerun:yes'>&nbsp; </span><span =
class=3DGramE>button(</span>0, 5, <span
class=3DSpellE>bSix</span>);<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'><span
style=3D'mso-spacerun:yes'>&nbsp; </span><span =
class=3DGramE>button(</span>0, 6, <span
class=3DSpellE>bSeven</span>);<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'><span
style=3D'mso-spacerun:yes'>&nbsp; </span><span =
class=3DGramE>button(</span>0, 7, <span
class=3DSpellE>bEight</span>);<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'>};<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'>// =
now write
the EPL code to do something when a <span class=3DSpellE>databit</span> =
changes
state<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'>// =
e.g. #1: a
toggle switch that types a message when flipped to on but =
does<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'>// =
nothing
when you turn it off again.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><span class=3DGramE><font size=3D2 color=3Dblue
face=3D"Lucida Console"><span =
style=3D'font-size:10.0pt;font-family:"Lucida Console";
color:blue'>void</span></font></span><font size=3D2 color=3Dblue
face=3D"Lucida Console"><span =
style=3D'font-size:10.0pt;font-family:"Lucida Console";
color:blue'> <span =
class=3DSpellE>dMyPanel.bOne.On</span>(void)<o:p></o:p></span></font></p>=


<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'>{<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'><span
style=3D'mso-spacerun:yes'>&nbsp; </span><span class=3DSpellE><span =
class=3DGramE>keyhit</span></span><span
class=3DGramE>(</span>S W I T C H SPACE O N E =
ENTER);<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'>}<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'>// =
e.g. #2: a
push button that sends press and release of a =
keystroke<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'>// =
with the on
and off transitions<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><span class=3DGramE><font size=3D2 color=3Dblue
face=3D"Lucida Console"><span =
style=3D'font-size:10.0pt;font-family:"Lucida Console";
color:blue'>void</span></font></span><font size=3D2 color=3Dblue
face=3D"Lucida Console"><span =
style=3D'font-size:10.0pt;font-family:"Lucida Console";
color:blue'> <span =
class=3DSpellE>dMyPanel.bTwo.On</span>(void)<o:p></o:p></span></font></p>=


<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'>{<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'><span
style=3D'mso-spacerun:yes'>&nbsp; </span><span class=3DSpellE><span =
class=3DGramE>keypress</span></span><span
class=3DGramE>(</span>P);<span style=3D'mso-spacerun:yes'>&nbsp; =
</span>// &#8220;make&#8221;
of P<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'>}<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'>// P =
key is
held until you release switch on M1R0B2 when this code will =
run:<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><span class=3DGramE><font size=3D2 color=3Dblue
face=3D"Lucida Console"><span =
style=3D'font-size:10.0pt;font-family:"Lucida Console";
color:blue'>void</span></font></span><font size=3D2 color=3Dblue
face=3D"Lucida Console"><span =
style=3D'font-size:10.0pt;font-family:"Lucida Console";
color:blue'> <span =
class=3DSpellE>dMyPanel.bTwo.Off</span>(void)<o:p></o:p></span></font></p=
>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'>{<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'><span
style=3D'mso-spacerun:yes'>&nbsp; </span><span class=3DSpellE><span =
class=3DGramE>keyrelease</span></span><span
class=3DGramE>(</span>P);<span style=3D'mso-spacerun:yes'>&nbsp; =
</span>// &#8220;break&#8221;
of P<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'>}<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'>// =
and so on
for all the other buttons&#8230;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal style=3D'margin-left:5.25pt'><font size=3D2 =
color=3Dblue
face=3D"Lucida Console"><span =
style=3D'font-size:10.0pt;font-family:"Lucida Console";
color:blue'>-- <span class=3DGramE>end</span> =
example<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'>Hope =
that
helps get you started.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'>There =
is no
need to plug in an analog joystick to the EPIC if you don&#8217;t need =
or want
to do that.<span style=3D'mso-spacerun:yes'>&nbsp; </span>The reason =
that you
might want to is if you plan to integrate code in your EPL files to =
define how
the joystick buttons work and/or because you want to read the analog =
axis
positions from your EPL file and do something appropriate with =
that.<span
style=3D'mso-spacerun:yes'>&nbsp; </span>For example, in our cockpit =
project we map
the Falcon4 &#8220;idle detent&#8221; keystroke to be triggered when the
throttle axis value drops as a result of manhandling the throttle handle =
past
the idle cutoff gate/stop.<span style=3D'mso-spacerun:yes'>&nbsp; =
</span>You can&#8217;t
really do that too easily with an analog axis that isn&#8217;t connected =
via
the EPIC. <span style=3D'mso-spacerun:yes'>&nbsp;</span>But then you may =
not need
to do something as involved as all that either =
;-)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida Console";color:blue'>[btw, =
syntax
notes: there&#8217;s no significance to the leading lower case letter I =
use on
names&#8230;I just use d&lt;something&gt; for devices and =
b&lt;something&gt;
for buttons so I can see what I&#8217;m manipulating in the =
code&#8230;sort of
a Hungarian naming thing.<span style=3D'mso-spacerun:yes'>&nbsp; =
</span>Case is
significant for the .On and .Off routine name suffixes =
though]<o:p></o:p></span></font></p>

<p class=3DMsoNormal><b style=3D'mso-bidi-font-weight:normal'><font =
size=3D2
color=3Dblue face=3D"Lucida Console"><span =
style=3D'font-size:10.0pt;font-family:
"Lucida =
Console";color:blue;font-weight:bold;mso-bidi-font-weight:normal'><o:p>&n=
bsp;</o:p></span></font></b></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'>Cheers,<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'>Mark.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Lucida =
Console"><span
style=3D'font-size:10.0pt;font-family:"Lucida =
Console";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<div style=3D'border:none;border-left:solid blue 1.5pt;padding:0in 0in =
0in 4.0pt'>

<p class=3DMsoNormal><font size=3D2 face=3DTahoma><span =
style=3D'font-size:10.0pt;
font-family:Tahoma'>-----Original Message-----<br>
<b><span style=3D'font-weight:bold'>From:</span></b>
simpits-tech-admin@simpits.org [mailto:simpits-tech-admin@simpits.org] =
<b><span
style=3D'font-weight:bold'>On Behalf Of </span></b>Dave Hensley<br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> =
</span></font><st1:date
Month=3D"12" Day=3D"11" Year=3D"2002"><font size=3D2 face=3DTahoma><span
 style=3D'font-size:10.0pt;font-family:Tahoma'>Wednesday, December 11, =
2002</span></font></st1:date><font
size=3D2 face=3DTahoma><span =
style=3D'font-size:10.0pt;font-family:Tahoma'> </span></font><st1:time
Hour=3D"14" Minute=3D"42"><font size=3D2 face=3DTahoma><span =
style=3D'font-size:10.0pt;
 font-family:Tahoma'>2:42 PM</span></font></st1:time><font size=3D2 =
face=3DTahoma><span
style=3D'font-size:10.0pt;font-family:Tahoma'><br>
<b><span style=3D'font-weight:bold'>To:</span></b> =
simpits-tech@simpits.org<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> [simpits-tech] =
EPIC
programming</span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Hey guys,</span></font><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I hope everyone is doing well with the holidays =
approaching.
:-)</span></font><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I have a question on programming an EPIC setup. This =
may
qualify as &quot;hand-holding&quot; but I need help getting started with =
this thing.
The docs I have don't help me and they also seem to be focused on the =
ISA EPIC
and pre-Epicenter software. I have the USB EPIC card with one expansion =
card,
and one EMDA card. Initially I will only be using pushbuttons and toggle
switches with the card. What would I need in the EPL file to initialize =
one row
of switches connected to the EMDA?</span></font><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Also, I have a USB joystick. Do I still need an =
analog stick
connected to the expansion card for everything to work correctly? I feel =
that
this should not be this complicated, but none of the attempts I have =
made have
worked. If someone has a similar setup and could send me a small example =
of a
EPL -or- if someone is willing to right a small EPL program that shows =
how I
define the EMDA card, it would mean a lot. </span></font><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Sorry to pester the group with this, but if I can =
just
understand how to start programming this thing, I think I can eventually =
figure
it out. </span></font><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Thanks!!</span></font><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Dave</span></font><o:p></o:p></p>

</div>

</div>

</div>

</body>

</html>

------=_NextPart_000_0019_01C2A168.545EE0D0--