<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Galil Tech Talk</title>
	<atom:link href="http://www.galilmc.com/techtalk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.galilmc.com/techtalk</link>
	<description></description>
	<pubDate>Wed, 10 Feb 2010 01:00:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Servo Motor Controller Basics</title>
		<link>http://www.galilmc.com/techtalk/motion-controllers/servo-motor-controller-basics/</link>
		<comments>http://www.galilmc.com/techtalk/motion-controllers/servo-motor-controller-basics/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 01:00:55 +0000</pubDate>
		<dc:creator>John Hayes</dc:creator>
		
		<category><![CDATA[Motion Controllers]]></category>

		<category><![CDATA[intro]]></category>

		<category><![CDATA[motor control basics]]></category>

		<category><![CDATA[Servo]]></category>

		<category><![CDATA[servo motor]]></category>

		<category><![CDATA[servo motor basics]]></category>

		<category><![CDATA[servo motor intro]]></category>

		<guid isPermaLink="false">http://www.galilmc.com/techtalk/?p=129</guid>
		<description><![CDATA[This article is a brief introduction to servo motor control and explains the different components in a servo motor system and how each component works to create the entire motion control solution.  An example system is shown here:

Servo Motor System Components

Brush or Brushless Servo Motor
Encoder / Feedback Device
Servo Motor Amplifier / Drive
Servo Motor Controller


Brush [...]]]></description>
			<content:encoded><![CDATA[<p>This article is a brief introduction to servo motor control and explains the different components in a servo motor system and how each component works to create the entire motion control solution.  An example system is shown here:<br />
<a href="http://www.galilmc.com/products/dmc-40x0.php"><img class="aligncenter size-medium wp-image-130" title="servo-motor-controller" src="http://www.galilmc.com/techtalk/wp-content/uploads/2010/02/servo-motor-controller-300x159.png" alt="Galil Servo Motor Control System" width="300" height="159" /></a></p>
<h2 style="font-size:18px;font-weight:bold;">Servo Motor System Components</h2>
<ul>
<li>Brush or Brushless Servo Motor</li>
<li>Encoder / Feedback Device</li>
<li>Servo Motor Amplifier / Drive</li>
<li>Servo Motor Controller</li>
</ul>
<p></p>
<h2 style="font-size:16px;font-weight:bold;">Brush / Brushless Motor</h2>
<p>The choice of what motor to use is usually an early step in the process of selecting a servo system.  The critical things to be aware of are the desired speed (RPMs or Revolutions Per Minute) and the desired torque.  Many times a speed-torque curve will be available for a motor that shows the amount of torque that a motor has at a specific speed.  Servo motors generally have a relatively flat speed torque curve in that the amount of torque the motor has available stays relatively constant up until you reach the maximum speed of the motor.  (A stepper motor on the other hand can have a significant ramp where the torque drops off considerably as the speed gets higher.).  A gear-head or mechanical gear-train can be used to increase the torque of a motor when necessary.</p>
<h2 style="font-size:16px;font-weight:bold;">Encoder / Feedback Device</h2>
<p>An encoder is a position sensor that outputs a signal telling the controller where the motor is and how fast it is moving.  Many servo motors come with an encoder built in however it is also possible to use an external encoder or feedback device to control a motor.  When using an external encoder, it is critical that there not be an excessive amount of compliance between the motor and the encoder.  Essentially, any change in the motor position should immediately be detected by the encoder.  A situation where the encoder is mounted after a belt drive will cause problems due to the compliance in the belt.  In a system where the position of the load is required, it is recommended to use two encoders - one directly on the back of the motor and a second encoder on the &#8220;load&#8221;.  The Galil controller has built in functionally called &#8220;dual-loop&#8221; mode to control a system with two feedback devices.</p>
<h2 style="font-size:16px;font-weight:bold;">Servo Motor Amplifier / Drive</h2>
<p>A servo motor amplifier takes a control signal from the motor controller and amplifies it up to deliver a specific amount of power to the motor.  There are a number of different types of servo amplifiers out there but a common one is called a &#8220;torque-mode&#8221; amplifier.  This type of amplifier converts the command signal from the controller into a specific amount of current (in Amps) delivered to the motor.  In a rotary motor - current is directly proportional to torque - so the amplifier is actually directly controlling the amount of torque on the motor.  In a linear motor, current is proportional to force - so likewise the amplifier is directly controlling the amount of force coming out of the motor.  The amplifier closes a current loop around the motor at a very fast rate so that the motor controller&#8217;s command signal closely matches the actual current that is delivered to the motor.</p>
<h2 style="font-size:16px;font-weight:bold;">Servo Motor Controller</h2>
<p>Up to this point, the components explained above can essentially take in a control signal and deliver a specific amount of current to a motor - the motor will then turn and the amount that it turns can be seen by the encoder.  The job of the servo motor controller (or commonly referred to as the motion controller) is to close the loop on the system by constantly looking at the encoder signal and applying a torque to the motor in order to control it.  The simplest form of this is to hold a specific position.  In this scenario, if a disturbance causes the motor to move off of a position - the encoder detects this change in position - creating an error signal.  This error signal is then translated into a commanded current by the controller in order to drive the motor back to the original position.  A more advanced case is when the controller wants to move the motor to a new position.  In this case the controller creates a desired motion profile using a specific acceleration, deceleration, and speed.  In a very fast loop, the controller commands a specific position for the motor at a precise time - this results in the motor rotating along the desired motion profile.</p>
<h2 style="font-size:16px;font-weight:bold;">Conclusion</h2>
<p>Galil offers a wide variety of motion controllers for servo systems.  To make things easy, Galil also offers a variety of optional plug-in amplifiers that mate up directly to the controller.  There are two series of motion controllers that offer this - one is the high-performance &#8220;Accelera&#8221; series shown here:<br />
<a href="http://www.galilmc.com/products/dmc-40x0.php" target="_blank">http://www.galilmc.com/products/dmc-40&#215;0.php</a><br />
and the other is the more cost-effective &#8220;Econo&#8221; series shown here:<br />
<a href="http://www.galilmc.com/products/dmc-21x3.php" target="_blank">http://www.galilmc.com/products/dmc-21&#215;3.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.galilmc.com/techtalk/motion-controllers/servo-motor-controller-basics/feed/</wfw:commentRss>
		</item>
		<item>
		<title>BiSS encoder interface for Galil controllers</title>
		<link>http://www.galilmc.com/techtalk/galil-news/biss-encoder-interface-for-galil-controllers/</link>
		<comments>http://www.galilmc.com/techtalk/galil-news/biss-encoder-interface-for-galil-controllers/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 19:23:41 +0000</pubDate>
		<dc:creator>Galil_AndyH</dc:creator>
		
		<category><![CDATA[Feedback Devices]]></category>

		<category><![CDATA[Inside Galil]]></category>

		<guid isPermaLink="false">http://www.galilmc.com/techtalk/?p=126</guid>
		<description><![CDATA[This article discusses the basics of the options for using a BiSS encoder with a Galil controller or Pocket PLC.
The Galil BiSS interface is a standard upgrade option for the following controllers:

DMC-40&#215;0 10/100Base-T Ethernet/RS232 Accelera Series 1-8 axis
DMC-21&#215;3 10Base-T Ethernet/RS232 Econo Series 1-8 axis
 RIO-47xxx 10/100Base-T Ethernet Intelligent I/O Controller
 DMC-18&#215;6 PCI Accelera Series 1-8 [...]]]></description>
			<content:encoded><![CDATA[<p>This article discusses the basics of the options for using a BiSS encoder with a Galil controller or Pocket PLC.</p>
<p>The Galil BiSS interface is a standard upgrade option for the following controllers:</p>
<ul>
<li><a href="http://www.galilmc.com/products/dmc-40x0.php">DMC-40&#215;0</a> 10/100Base-T Ethernet/RS232 Accelera Series 1-8 axis</li>
<li><a href="http://www.galilmc.com/products/dmc-21x3.php">DMC-21&#215;3</a> 10Base-T Ethernet/RS232 Econo Series 1-8 axis</li>
<li><a href="http://www.galilmc.com/products/rio-47xxx.php"> RIO-47xxx</a> 10/100Base-T Ethernet Intelligent I/O Controller</li>
<li><a href="http://www.galilmc.com/products/dmc-18x6.php"> DMC-18&#215;6</a> PCI Accelera Series 1-8 axis</li>
<li><a href="http://www.galilmc.com/products/dmc-18x2.php"> DMC-18&#215;2</a> PCI Econo Series 1-4 axi</li>
<li><a href="http://www.galilmc.com/products/cds-3310.php"> CDS-3310</a> 10/100Base-T Ethernet/RS232 1 axis controller with 500W servo drive</li>
</ul>
<p>Galil supports a point to point unidirectional BiSS interface.&nbsp; Each BiSS encoder is wired directly to the Galil controller, and the controller addresses each individual encoder independently.</p>
<p>Galil has supported single-turn and multi-turn rotary and linear absolute encoders from the following companies</p>
<ul>
<li>Renishaw Resolute</li>
<li>Hengstler Absolute BiSS encoders (AD/AC series)</li>
</ul>
<p>If your encoder is not on the above list, please contact Galil to speak with an Application Engineer to discuss your application.</p>
<p>For more information on the BiSS protocol - http://www.biss-ic.de/</p>
<p><img src="http://www.galilmc.com/techtalk/wp-content/uploads/2009/11/biss_icon1.png" alt="" height="60" width="162"></p>
]]></content:encoded>
			<wfw:commentRss>http://www.galilmc.com/techtalk/galil-news/biss-encoder-interface-for-galil-controllers/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using Custom Classes in a GalilTools C# Application</title>
		<link>http://www.galilmc.com/techtalk/software/using-custom-classes-in-a-galiltools-c-application/</link>
		<comments>http://www.galilmc.com/techtalk/software/using-custom-classes-in-a-galiltools-c-application/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 16:59:07 +0000</pubDate>
		<dc:creator>John Hayes</dc:creator>
		
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.galilmc.com/techtalk/?p=118</guid>
		<description><![CDATA[This article deals with using custom Classes with the GalilTools API.  In the first article located here:
http://www.galilmc.com/techtalk/software/how-to-create-a-custom-class-library-with-galiltools/
we created a new custom class that was able to access the RIO Data Record and parse it.  In this article, we will use the class that was created (RIO_DataRecord.cs) and show how to include it into a new [...]]]></description>
			<content:encoded><![CDATA[<p>This article deals with using custom Classes with the GalilTools API.  In the first article located here:</p>
<p><a href="http://www.galilmc.com/techtalk/software/how-to-create-a-custom-class-library-with-galiltools/" target="_blank">http://www.galilmc.com/techtalk/software/how-to-create-a-custom-class-library-with-galiltools/</a></p>
<p>we created a new custom class that was able to access the RIO Data Record and parse it.  In this article, we will use the class that was created (RIO_DataRecord.cs) and show how to include it into a new C# application.  First create a new C# project and call it RIO_DR_class_demo as shown here:<br />
<a href="http://www.galilmc.com/techtalk/wp-content/uploads/2009/10/figure1.png"><img class="alignnone size-full wp-image-119" title="figure1" src="http://www.galilmc.com/techtalk/wp-content/uploads/2009/10/figure1.png" alt="" width="499" height="359" /></a></p>
<p>Copy the class file created in the previous TechTalk article (named RIO_DataRecord.cs) and put the class file into the folder where your solution is located.</p>
<p>Add the RIO Data Record Class file to Solution Explorer by clicking &#8220;Project -&gt;Add Existing Item&#8221; and choosing the RIO_DataRecord.cs file.  You should now see the file in the Solution Explorer as part of the project.</p>
<p>Double Click on the Form to get to the &#8220;Code View&#8221;.</p>
<p>Click on Project-&gt;Add Reference and click on the COM tab.  Add the Galil component. (Must have GalilTools or GalilTools Lite installed) (Select -&gt; OK)<br />
<a href="http://www.galilmc.com/techtalk/wp-content/uploads/2009/10/figure2.png"><img class="alignnone size-full wp-image-121" title="figure2" src="http://www.galilmc.com/techtalk/wp-content/uploads/2009/10/figure2.png" alt="" width="499" height="393" /></a></p>
<p>Add a label to the form and a Button.  Change the text of the button to Get Sample Time. Add a textbox to the form. Delete the default text in the textbox and the label so they are blank.</p>
<p>At the top of the code, we need to add the namespace that is called out in the class file so add the following:</p>
<pre>using RIO_DataRecord_namespace;</pre>
<p>Then add</p>
<pre>private Galil.Galil g = new Galil.GalilClass();
private RIO_DataRecord r;

private const int RIO_ANALOGIO_CHANNELS = 8;</pre>
<p>inside the public class Form1  above the public Form1()</p>
<p>The code should look something like this:</p>
<p><a href="http://www.galilmc.com/techtalk/wp-content/uploads/2009/10/figure3b.png"><img class="alignnone size-full wp-image-120" title="figure3b" src="http://www.galilmc.com/techtalk/wp-content/uploads/2009/10/figure3b.png" alt="" width="500" height="386" /></a></p>
<p>Add the following code to the Form1_Load():</p>
<pre>try
{
g.address = "";  //open connection Dialog.
label1.Text = label1.Text + g.connection() + "\r\n";
label1.Text = label1.Text + g.commandValue("MG TIME").ToString();

r = new RIO_DataRecord(ref g);
r.AnIn = new ushort[RIO_ANALOGIO_CHANNELS];
r.AnOut = new ushort[RIO_ANALOGIO_CHANNELS];

}
catch (System.Runtime.InteropServices.COMException ex)
{
label1.Text = label1.Text + ex.Message.Trim() + &#8220;\r\n&#8221;;
}
Double click on the button and add the following code to the button click
r.GetRecord(g);
textBox1.Text = r.SampleNumber.ToString();</pre>
<p>Save your project.  It should look something like this:</p>
<p><a href="http://www.galilmc.com/techtalk/wp-content/uploads/2009/10/figure4.png"><img class="alignnone size-full wp-image-122" title="figure4" src="http://www.galilmc.com/techtalk/wp-content/uploads/2009/10/figure4.png" alt="" width="499" height="354" /></a></p>
<p>Run it and it should prompt you with a connection dialog.  Click on the controller and hit Connect:</p>
<p><a href="http://www.galilmc.com/techtalk/wp-content/uploads/2009/10/figure5.png"><img class="alignnone size-full wp-image-123" title="figure5" src="http://www.galilmc.com/techtalk/wp-content/uploads/2009/10/figure5.png" alt="" width="412" height="356" /></a></p>
<p>Click on the &#8220;Get Sample Time&#8221; button to get the current sample time using the RIO_DataRecord class.</p>
<p><a href="http://www.galilmc.com/techtalk/wp-content/uploads/2009/10/figure6.png"><img class="alignnone size-full wp-image-124" title="figure6" src="http://www.galilmc.com/techtalk/wp-content/uploads/2009/10/figure6.png" alt="" width="500" height="352" /></a></p>
<p>That has successfully used the class to grab information out of the RIO data record.  An optional step is to then add another label to the form and include the following code in the button click in order to display all of the RIO data record information:</p>
<pre>string str="", AO="",AI="";
str="Header bytes in Hex = "+r.Header.ToString("X")+"\r\n"+
"Sample Number = "+r.SampleNumber.ToString()+"\r\n"+
"Error Code = "+ r.ErrorCode.ToString()+"\r\n"+
"General Status = " + r.GenSatus.ToString()+"\r\n";
for (int i = 0; i &lt; 7; i++)
{
AO=AO+r.AnOut[i].ToString()+&#8221;  &#8220;;
}

str=str+&#8221;Analog Outputs = &#8220;+AO+&#8221;\r\n&#8221;;
for (int i = 0; i &lt; 7; i++)
{
AI=AI+r.AnIn[i].ToString()+&#8221;  &#8220;;
}
str=str+&#8221;Analog Inputs = &#8220;+AI+&#8221;\r\n&#8221;;
str=str+ &#8220;Digital Outputs = &#8220;+ r.DOut.ToString()+&#8221;\r\n&#8221;+
&#8220;Digital Inputs = &#8221; + r.DIn.ToString()+&#8221;\r\n&#8221;+
&#8220;Pulse Counter = &#8221; + r.PulseCount.ToString()+&#8221;\r\n&#8221;+
&#8220;ZC Data = &#8220;+ r.ZcData.ToString()+&#8221;\r\n&#8221;+
&#8220;ZD Data = &#8220;+r.ZdData.ToString();
label2.Text = str;</pre>
<p>The result will look something like this:<br />
<a href="http://www.galilmc.com/techtalk/wp-content/uploads/2009/10/figure7.png"><img class="alignnone size-full wp-image-125" title="figure7" src="http://www.galilmc.com/techtalk/wp-content/uploads/2009/10/figure7.png" alt="" width="500" height="352" /></a></p>
<p>The last thing to do is to use the ZC property that was created in the class.   You simply need to add the following code at the top of the button click:</p>
<pre>r.ZC = "12";</pre>
<p>That will send a value of 12 to the ZC command and the ZC Data in the data record should also reflect the change.</p>
<p>That completes the application code showing how to interface to a custom class from a C# application.  Creating a custom class allows the user to expand the functionality of the GalilTools API and gives the programmer the ability to create routines that can optimize code.  Contact a Galil Applications Engineer for more info on writing custom classes and interfacing them to a .NET application.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.galilmc.com/techtalk/software/using-custom-classes-in-a-galiltools-c-application/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How To Create a Custom Class Library with GalilTools</title>
		<link>http://www.galilmc.com/techtalk/software/how-to-create-a-custom-class-library-with-galiltools/</link>
		<comments>http://www.galilmc.com/techtalk/software/how-to-create-a-custom-class-library-with-galiltools/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 23:58:23 +0000</pubDate>
		<dc:creator>John Hayes</dc:creator>
		
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.galilmc.com/techtalk/?p=116</guid>
		<description><![CDATA[This article describes how to create a class that has properties and methods that can be used to enhance the functionality of the standard GalilTools API in a .NET environment.  The default API provides a good base communication shell that allows the user to connect to a controller, send commands, upload/download programs, upload/download arrays, [...]]]></description>
			<content:encoded><![CDATA[<p>This article describes how to create a class that has properties and methods that can be used to enhance the functionality of the standard GalilTools API in a .NET environment.  The default API provides a good base communication shell that allows the user to connect to a controller, send commands, upload/download programs, upload/download arrays, and work with the controllers built in memory map (called the Data Record).  However, for more advanced functions - the user can implement a Class that adds a layer of customization to the bare API.  For example, to access the value of analog input 1 on the controller, the simplest approach is to do the following:</p>
<p style="padding-left: 30px;">Label1.Text=g.commandValue(&#8221;MG@AN[1]&#8220;)</p>
<p>Where g represents an object that holds the &#8220;Galil&#8221; class from the GalilTools Class Library.  This will populate Label1 with the value of the response to the command that was sent.  Similarly, the A axis actual position could be read using a similar structure:</p>
<p style="padding-left: 30px;">Label1.Text=g.commandValue(&#8221;TPA&#8221;)</p>
<p>so it is possible to quickly and easily get access to any Galil command using the g.commandValue( _ ) format.  However, it is also nice to get to the same information using a call such as:</p>
<p>Label1.Text = r.AnIn[1]</p>
<p>So , for more complex applications where there could be numerous queries to many different commands - it may be desirable to streamline communication - and therefore it is best to grab the information in one big &#8220;snapshot&#8221; and then parse that information out as opposed to grabbing each individual item one at a time.  Enter the controllers Data Record - this is similar to a memory map of the controller that can be sent out of the controller as one big packet and then leverages the software running on the PC to provide access to the desired information.  In this way, the communication can be made more efficient by requiring less individual queries for items that are contained in the Data Record.</p>
<p>A second problem with the first method shown above is that it requires the programmer to get the command syntax correct every time they request a piece of information.  If they enter the wrong string for the g.command( _ ) call, then the program will fail at runtime - but there is no indication that anything is wrong when writing the program.  To solve these issues, a custom &#8220;Class&#8221; library can be used that packages the programmers functions and data requests into a more manageable format.  The goal of the class will be to create a method that will allow us to get the DataRecord information into an object and also to create a property that has read/write capability.  As an example we will be working with the RIO hardware but the same type of programming can  be applied to any Galil controller.</p>
<p>We&#8217;ll use the C# programming language but the same idea applies for other languages as well.  Open Visual Studio and create a new Class Library file.  Visual Studio starts out with a namespace, a class called Class1 and the constructor called Class1( ).  The &#8220;constructor&#8221; Class1( ) will run when the class is first created - it can be thought of as the initialization routine.  Keep this in mind as we will refer to it later in the article.</p>
<p>There are three main things that are used in classes - methods, properties, and events.  Methods are essentially subroutines that can have a return value and optionally a list of parameters that can be passed in and out of the routine.  Properties are essentially variables or values that are stored as part of the class.  Lastly - events can be created in order to alert the main program when something happens.  In this article we&#8217;re going to stick with the first two - methods and properties.</p>
<p>So, after all that - lets get to something useful.  The goal here is to write a class that will allow access to the RIO Data Record.  This way, the information in the data record can be read in a simpler format than specifying the Galil command every time the data is requested.  Here is an example of how we will be grabbing the sample time from the data record in the new format:<br />
textBox1.Text = r.SampleNumber.ToString();<br />
(note: the .ToString() is to convert the value from an integer to a string for display purposes)</p>
<p>First, I&#8217;ll show the entire class definition and then we will break it up and discuss each section.  Here&#8217;s the entire class:</p>
<pre>using System;
using System.Text;

namespace RIO_DataRecord_namespace
{
	/// &lt;summary&gt;
	/// RIO_DataRecord_Class gives access to the RIO DataRecord
	/// &lt;/summary&gt;
	public class RIO_DataRecord
	{
		public uint Header;
		public ushort SampleNumber;
		public byte ErrorCode;
		public byte GenSatus;
		public ushort[] AnOut;
		public ushort[] AnIn;
		public ushort DOut;
		public ushort DIn;
		public uint PulseCount;
		public int ZcData;
		public int ZdData;

		private string zcdata=&#8221;";

		const int RIO_RECORD_BYTES = 56;
		const int RIO_ANALOGIO_CHANNELS = 8;
		private Galil.Galil g;
		public RIO_DataRecord(ref Galil.Galil g_passed)
		{
			g=g_passed;
			GetRecord(g);
		}

		public void GetRecord(Galil.Galil g)
		{
			Byte[] b = new Byte[RIO_RECORD_BYTES];
			try
			{
				String s = &#8220;&#8221;;
				g.write(&#8221;QR\r&#8221;);
				while (s == &#8220;&#8221;)
				{
					s = g.read();
				}
				b = ASCIIEncoding.Default.GetBytes(s);
				packRioRecord(b);
			}
			catch
			{
				//throw error
			}
		}

		void packRioRecord(Byte[] b)
		{
			Header = BitConverter.ToUInt32(b, 0);
			SampleNumber = BitConverter.ToUInt16(b, 4);
			ErrorCode = b[6];
			GenSatus = b[7];
			for (int i = 0; i &lt; RIO_ANALOGIO_CHANNELS; i++)
			{
				AnOut[i] = BitConverter.ToUInt16(b, 8 + (2 * i));
			}
			for (int i = 0; i &lt; RIO_ANALOGIO_CHANNELS; i++)
			{
				AnIn[i] = BitConverter.ToUInt16(b, 24 + (2 * i));
			}
			DOut = BitConverter.ToUInt16(b, 40);
			DIn = BitConverter.ToUInt16(b, 42);
			PulseCount = BitConverter.ToUInt32(b, 44);
			ZcData = BitConverter.ToInt32(b, 48);
			ZdData = BitConverter.ToInt32(b, 52);
		}

		public string ZC
		{
			get
			{
				string str=&#8221;MG_ZC&#8221;;
				zcdata=g.command(str,&#8221;\r&#8221;,&#8221;:&#8221;,true);
				return zcdata;
			}
			set
			{
				string str=&#8221;ZC&#8221;+value;
				g.commandValue(str);
				zcdata=value;
			}
		}

	}
}</pre>
<p>We&#8217;ll start from the top.  To get the Data Record from the RIO, we first have to create the map for the data that gets returned from the QR command.  The QR command returns a packet of binary data that we will parse to get specific information.  To parse the information, we&#8217;ll need to use some of the built in functions of .NET that are contained in the System.Text namespace.</p>
<p>So we first add the System.Text namespace at the top of the code. Next, you will need to add the variable definitions above the &#8220;constructor&#8221; method after the RIO_DataRecord class definition as shown below.  The size of each variable is taken from Chapter 3 of the RIO User Manual that explains how many bytes are contained in each piece of data.</p>
<pre>using System;
using System.Text;

namespace RIO_DataRecord_namespace
{
	/// &lt;summary&gt;
	/// RIO_DataRecord_Class gives access to the RIO DataRecord
	/// &lt;/summary&gt;
	public class RIO_DataRecord
	{
		public uint Header;
		public ushort SampleNumber;
		public byte ErrorCode;
		public byte GenSatus;
		public ushort[] AnOut;
		public ushort[] AnIn;
		public ushort DOut;
		public ushort DIn;
		public uint PulseCount;
		public int ZcData;
		public int ZdData;

		private string zcdata=&#8221;";

		const int RIO_RECORD_BYTES = 56;
		const int RIO_ANALOGIO_CHANNELS = 8;
		private Galil.Galil g;</pre>
<p>Next we can add code to the constructor which as you will recall is what runs when the class is created.  In this case we will need to pass the Galil object that gets created by the main program so that we can use the previously opened connection to send a command and get a response from the controller.  To do this, use the following constructor:</p>
<pre>		public RIO_DataRecord(ref Galil.Galil g_passed)
		{
			g=g_passed;
			GetRecord(g);
		}</pre>
<p>Now, lets make the GetRecord( ) function that handles sending the QR command and then getting the response.  <em>Note that the .read and .write method of getting the QR info is a very specific case when dealing with the binary response from the controller - in all other cases, the g.command or g.commandValue should be used to send/receive commands to the controller.  Also the while loop is not necessary when using the g.command or g.commandValue and therefore  those functions will speed up communication compared to the .read and .write methods.</em></p>
<pre>		public void GetRecord(Galil.Galil g)
		{
			Byte[] b = new Byte[RIO_RECORD_BYTES];
			try
			{
				String s = &#8220;&#8221;;
				g.write(&#8221;QR\r&#8221;);
				while (s == &#8220;&#8221;)
				{
					s = g.read();
				}
				b = ASCIIEncoding.Default.GetBytes(s);
				packRioRecord(b);
			}
			catch
			{
				//throw error
			}
		}</pre>
<p>Notice there is a function that is called packRioRecord(b) inside the above method.  Next, we will create that function so that the Data Record packet that was retrieved can be populated into the correct format.  Here is the function that does this:</p>
<pre>		void packRioRecord(Byte[] b)
		{
			Header = BitConverter.ToUInt32(b, 0);
			SampleNumber = BitConverter.ToUInt16(b, 4);
			ErrorCode = b[6];
			GenSatus = b[7];
			for (int i = 0; i &lt; RIO_ANALOGIO_CHANNELS; i++)
			{
				AnOut[i] = BitConverter.ToUInt16(b, 8 + (2 * i));
			}
			for (int i = 0; i &lt; RIO_ANALOGIO_CHANNELS; i++)
			{
				AnIn[i] = BitConverter.ToUInt16(b, 24 + (2 * i));
			}
			DOut = BitConverter.ToUInt16(b, 40);
			DIn = BitConverter.ToUInt16(b, 42);
			PulseCount = BitConverter.ToUInt32(b, 44);
			ZcData = BitConverter.ToInt32(b, 48);
			ZdData = BitConverter.ToInt32(b, 52);
		}</pre>
<p>The last thing to do is to show how to create a property instead of a method as shown above.  Properties do not take input parameters - however they can have a value set or a value read.  The code below shows how to create a new property called ZC that will set a value for the ZC value in the data record or will retrieve the value that is currently stored.</p>
<pre>                public string ZC
		{
			get
			{
				string str="MG_ZC";
				zcdata=g.command(str,"\r",":",true);
				return zcdata;
			}
			set
			{
				string str="ZC"+value;
				g.commandValue(str);
				zcdata=value;
			}
		}

	}
}</pre>
<p>and that finishes the class.  This example shows how to create properties and methods for a custom user class that can extend the capabilities of the GalilTools programming interface.  From here, it is easy to see how one could create a class with custom routines and properties that allow for high level methods and properties.</p>
<p>Save this file and watch for Part 2 of this article which explains how to reference a class inside a C# program.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.galilmc.com/techtalk/software/how-to-create-a-custom-class-library-with-galiltools/feed/</wfw:commentRss>
		</item>
		<item>
		<title>RIO-47122 Pocket PLC Now Reads Position Sensors</title>
		<link>http://www.galilmc.com/techtalk/galil-news/rio-4712x-pocket-plc-now-reads-position-sensors/</link>
		<comments>http://www.galilmc.com/techtalk/galil-news/rio-4712x-pocket-plc-now-reads-position-sensors/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 16:43:03 +0000</pubDate>
		<dc:creator>Galil_MarkM</dc:creator>
		
		<category><![CDATA[Inside Galil]]></category>

		<guid isPermaLink="false">http://www.galilmc.com/techtalk/?p=115</guid>
		<description><![CDATA[The RIO-47122 Pocket PLC now accepts inputs from two position sensors such as quadrature encoders, SSI encoders and BiSS encoders. The new RIO options are listed below.   Additional position channels and I/O options are available upon request.
Quadrature Encoders
Allows use of two encoders
(Channels A+,A-, B+,B-, Index+, Index-)
Part Number: RIO-47122-QUAD
SSI Encoders
Allows use of two (2) SSI [...]]]></description>
			<content:encoded><![CDATA[<p>The RIO-47122 Pocket PLC now accepts inputs from two position sensors such as quadrature encoders, SSI encoders and BiSS encoders. The new RIO options are listed below.   Additional position channels and I/O options are available upon request.</p>
<p>Quadrature Encoders<br />
Allows use of two encoders<br />
(Channels A+,A-, B+,B-, Index+, Index-)<br />
Part Number: RIO-47122-QUAD</p>
<p>SSI Encoders<br />
Allows use of two (2) SSI encoders<br />
Part Number: RIO-47122-SSI</p>
<p>BiSS Encoders<br />
Allows use of two (2) BiSS encoders<br />
Part Number: RIO-47122-BISS</p>
<p>The new RIO encoder option accepts the position sensor signals at frequencies up to 10 MHz allowing for high speed counting. The Galil command TP (Tell Position) and DP (Define Position) are used to read and define the position, respectively.  The charge for the position input option is $75 in single quantity and $35 in quantities of 100.  Other features of the RIO include analog and digital I/O, Ethernet and RS232 ports, RISC processor for fast I/O handling, PID process control loops, timers, data logging, ability to send email alerts, Power-over-Ethernet, and more.  Custom options are also available.<br />
Please consult Galil at 1-800-377-6329 or see <a href="http://www.galilmc.com/products/rio-47xxx.php" target="_blank">http://www.galilmc.com/products/rio-47xxx.php</a> for more information.<br />
<a href="http://www.galilmc.com/support/servotrends.php">View Other Servotrends Articles</a></p>
<li class="pdf"><a href="http://www.galilmc.com/support/servotrends/st_10_09.pdf" target="_blank">View Entire ServoTrends Newsletter (Printer Friendly)</a></li>
]]></content:encoded>
			<wfw:commentRss>http://www.galilmc.com/techtalk/galil-news/rio-4712x-pocket-plc-now-reads-position-sensors/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Coordinate Transformation Options</title>
		<link>http://www.galilmc.com/techtalk/motion-controllers/coordinate-transformation-options/</link>
		<comments>http://www.galilmc.com/techtalk/motion-controllers/coordinate-transformation-options/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 19:39:51 +0000</pubDate>
		<dc:creator>Galil_Todds</dc:creator>
		
		<category><![CDATA[Motion Controllers]]></category>

		<guid isPermaLink="false">http://www.galilmc.com/techtalk/?p=108</guid>
		<description><![CDATA[Summary
Galil now offers users the option of ordering motion controllers with  on board Coordinate Transformation.  This option allows a user with a complex kinematic transform to have that calculation performed directly on the Galil controller.  Working with a Galil application engineer, the user will review the forward and reverse kinematic transformation for their particular machine.  [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Summary</strong></p>
<p>Galil now offers users the option of ordering motion controllers with  on board Coordinate Transformation.  This option allows a user with a complex kinematic transform to have that calculation performed directly on the Galil controller.  Working with a Galil application engineer, the user will review the forward and reverse kinematic transformation for their particular machine.  These equations are then written into the firmware of the Galil controller.  The end result of this process is that the transformation now occurs upon the calculation of each servo update (up to 32kHz), and the user can command the system in machine coordinates rather than simple encoder counts.  In addition, this saves the PC from the burden of performing these sometimes complex calculations.</p>
<p><strong>Benefits</strong></p>
<p>There are many benefits to the Galil implementation of coordinate transformations.  First, with the transformation operating in firmware space rather than user software space, the transformation is able to run quickly and deterministically on each servo update.  There is no latency or variability to the rate of calculation.  Second, as the transformation is handled within the firmware, the user software space is available and unburdened by the overhead of complex transformations.  This allows for faster execution of software routines for other aspects of the application.  Finally, as part of the implementation, Galil will consult with you about your specific application.  This can lead to recommendations which may improve system performance and safety.</p>
<p><strong>Required information</strong></p>
<p>1.  Detailed description of the mechanics to be implemented.  This should include drawings and/or photographs of the specific machine.<br />
2.  Forward and reverse kinematic equations for the specific mechanics.  If these have not already been derived, Galil application engineers will consult with you to derive those equations and make recommendations on the best possible approach.<br />
3.  Detailed description of the application and motions.  This will include typical moves (point to point, constant velocity, high speed step/settle, etc), encoder resolutions, required keep-out zones, expected system bandwidth and any other information related to the motion of the machine.<br />
4.  System boundaries and other range of motion information.  This allows the firmware to work within the usable space of the machine.</p>
<p><strong>Examples</strong></p>
<p>There are many examples of systems which require coordinate transformations for operation, but two of the simplest and most common are the hexapod and the SCARA robot.</p>
<p><em>1.  Hexapod</em> – A hexapod is a motion platform which has 3 points of contact from 6 individual axes. Imagine 2 linear actuators connected to each corner of a triangle, and you have the basic layout of a hexapod.  A traditional hexapod will give the user 6 degrees of freedom (6dof) in motion, and are commanded with coordinates of Yaw, Pitch, Roll, Heave, Surge and Sway.  The equations of motion for a hexapod could be implemented into the Galil, allowing the user to program the controller in the standard 6dof coordinate system rather than the individual axes (A,B,C,D,E,F,G) format.<br />
<em>2.  SCARA robot</em> – A SCARA robot is a standard positioning robot format which allows positioning of an end effector in the XYplane.  The user is able to command motion to an XY coordinate, with the transformation converting this XY position to the required  mechanics of the robot.  Figure 1 below shows a variation of the SCARA robot.</p>
<p><a href="http://www.galilmc.com/techtalk/wp-content/uploads/2009/07/scara1.jpg"><img class="aligncenter size-medium wp-image-114" src="http://www.galilmc.com/techtalk/wp-content/uploads/2009/07/scara2-300x290.jpg" alt="" width="300" height="290" /></a><a href="http://www.galilmc.com/techtalk/wp-content/uploads/2009/07/scara2.jpg"></a></p>
<p style="center;">Figure 1. A coordinate transformation is ideal for this 2-axis SCARA robot</p>
<p><strong>Additional information</strong></p>
<p>Galil has additional detail information regarding coordinate transformations, and how they may be integrated into the Galil motion controllers.  Two white papers have been written which are available on the Galil website.  The links for these pages are as follows:</p>
<p>1.  <a href="http://www.galilmc.com/support/appnotes/optima/note3415.pdf">http://www.galilmc.com/support/appnotes/optima/note3415.pdf</a></p>
<p>2.  <a href="http://www.galilmc.com/support/appnotes/optima/note3416.pdf">http://www.galilmc.com/support/appnotes/optima/note3416.pdf</a></p>
<p><img src="/DOCUME~1/todds/LOCALS~1/Temp/moz-screenshot-2.jpg" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.galilmc.com/techtalk/motion-controllers/coordinate-transformation-options/feed/</wfw:commentRss>
		</item>
		<item>
		<title>S-Curve Motion Profile Using Contour Mode</title>
		<link>http://www.galilmc.com/techtalk/motion-controllers/s-curve-motion-profile-using-contour-mode/</link>
		<comments>http://www.galilmc.com/techtalk/motion-controllers/s-curve-motion-profile-using-contour-mode/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 21:33:33 +0000</pubDate>
		<dc:creator>John Hayes</dc:creator>
		
		<category><![CDATA[DMC Programming]]></category>

		<category><![CDATA[Motion Controllers]]></category>

		<guid isPermaLink="false">http://www.galilmc.com/techtalk/?p=98</guid>
		<description><![CDATA[In some applications, an S-curve motion profile can help to smooth the motion and reduce the possibility of exciting a vibration or oscillation.  The &#8220;S-curve&#8221; refers to the rounded &#8220;S&#8221; shape of the velocity versus time graph.  To understand where the &#8220;S&#8221; comes from we have to first look at the acceleration vs time graphs.  [...]]]></description>
			<content:encoded><![CDATA[<p>In some applications, an S-curve motion profile can help to smooth the motion and reduce the possibility of exciting a vibration or oscillation.  The &#8220;S-curve&#8221; refers to the rounded &#8220;S&#8221; shape of the velocity versus time graph.  To understand where the &#8220;S&#8221; comes from we have to first look at the acceleration vs time graphs.  In a standard trapezoidal motion profile, the acceleration vs time graph is essentially a &#8220;step&#8221; function.  In an s-curve profile, the acceleration vs. time graph is a triangle (as shown in the image below) or possibly a trapezoid.</p>
<p><a href="http://www.galilmc.com/techtalk/wp-content/uploads/2009/07/accel-profile.jpg"><img class="alignnone size-full wp-image-99" title="accel-profile" src="http://www.galilmc.com/techtalk/wp-content/uploads/2009/07/accel-profile.jpg" alt="Acceleration profiles for S-curve and Trapezoidal motion" width="451" height="252" /></a></p>
<p>The derivative of acceleration is called &#8220;jerk&#8221; and by ramping up the acceleration - it eliminates the instantaneous change in acceleration.  The result is a rounded velocity profile that can be seen on the overlay of an s-curve and a triangular move profile shown here:</p>
<p><a href="http://www.galilmc.com/techtalk/wp-content/uploads/2009/07/scurve-vs-triangular-profile.jpg" target="_blank"><img class="alignnone size-medium wp-image-100" title="Scurve-vs-triangular-profile" src="http://www.galilmc.com/techtalk/wp-content/uploads/2009/07/scurve-vs-triangular-profile-300x229.jpg" alt="" width="300" height="229" /></a></p>
<p>One method of getting an s-curve motion profile is to use the Contour Mode of motion programming which allows the user to define any shape of curve and input it directly into the controller.  In the following example, I&#8217;ll show you how to create an S-curve profile using an Excel spreadsheet and then download it to a controller.  To simplify things, we are going to put some constraints on the s-curve profile.  The first constraint is that there will be no &#8220;constant speed&#8221; portion of the move.  The first half of the move will be the acceleration phase and the second half of the move will be the deceleration phase.  The second constraint is that our move will be made up of 100 contour data segments.</p>
<p>The excel spreadsheet calculates the s-curve profile and uses a Macro to download the data to the controller (GalilTools or GalilTools Lite must be installed in order for the Macro to work).  Open the Excel file and make sure that macro capability is enabled.  Next, put in the desired length of move (positive or negative values are accepted) and put in the desired DT value.  The DT value defines how long the move will take - for more information on how the DT value affects the move, please see the command reference for your controller.  After defining those two parameters - click on the button labeled &#8220;Accelera Download&#8221; for Accelera series controllers or &#8220;Econo Download&#8221; for Econo and Optima based controllers.</p>
<p>The Excel worksheet can be modified to extend the number of points, change the axis designation or  change the move profile.</p>
<p>Watch the video on how it works from here (no sound):</p>
<p><a href="http://www.galilmc.com/ftp/pub/appnotes/s-curve/s-curve.swf" target="_blank"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--></a></p>
<p><a href="http://www.galilmc.com/ftp/pub/appnotes/s-curve/s-curve.avi" target="_blank">http://www.galilmc.com/ftp/pub/appnotes/s-curve/s-curve.avi</a></p>
<p>Download the Excel file from here:</p>
<p><a href="http://www.galilmc.com/ftp/pub/appnotes/s-curve/s-curve-gt.xls" target="_blank">http://www.galilmc.com/ftp/pub/appnotes/s-curve/s-curve-gt.xls</a></p>
<p>Alternatively, a s-curve-creator.dmc program can be downloaded and run that dynamically creates the s-curve profile in Galil DMC code.  This can be downloaded from the &#8220;Modes of Motion&#8221; section of the Sample DMC Code library here:</p>
<p><a href="http://www.galilmc.com/support/sample-dmc-code.php" target="_blank">http://www.galilmc.com/support/sample-dmc-code.php</a></p>
<p>For information on how to get the standard upgrade option of having an s-curve velocity profile as part of the PA, PR, or JG mode of motion - contact a Galil Applications Engineer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.galilmc.com/techtalk/motion-controllers/s-curve-motion-profile-using-contour-mode/feed/</wfw:commentRss>
<enclosure url="http://www.galilmc.com/ftp/pub/appnotes/s-curve/s-curve.avi" length="18603520" type="video/x-msvideo" />
		</item>
		<item>
		<title>Laser Control Options</title>
		<link>http://www.galilmc.com/techtalk/motion-controllers/laser-control-options/</link>
		<comments>http://www.galilmc.com/techtalk/motion-controllers/laser-control-options/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 20:48:13 +0000</pubDate>
		<dc:creator>Galil_DJR</dc:creator>
		
		<category><![CDATA[Motion Controllers]]></category>

		<guid isPermaLink="false">http://www.galilmc.com/techtalk/?p=102</guid>
		<description><![CDATA[Galil Laser Control options focus around a group of specific application requirements found primarily in laser marking, inscribing, raster imaging, and intensity control.  Although lasers are particularly suited to these modes, many other technologies are applicable, including focused ultrasound, imaging and high speed inspection, and plasma and water cutting.
The typical mechanics configuration for a Laser [...]]]></description>
			<content:encoded><![CDATA[<p>Galil Laser Control options focus around a group of specific application requirements found primarily in laser marking, inscribing, raster imaging, and intensity control.  Although lasers are particularly suited to these modes, many other technologies are applicable, including focused ultrasound, imaging and high speed inspection, and plasma and water cutting.</p>
<p>The typical mechanics configuration for a Laser Control application is a two or three axis stage actuating a laser rail.  The control signal for a laser application is typically a PWM (Pulse Width Modulated) digital signal at a particular frequency and duty cycle (see Figure 1)</p>
<p><a href="http://www.galilmc.com/techtalk/wp-content/uploads/2009/07/pwm.png"><img class="aligncenter size-full wp-image-106" src="http://www.galilmc.com/techtalk/wp-content/uploads/2009/07/pwm.png" alt="50% Pulse Width Modulated signal with increasing frequency" width="475" height="77" /></a></p>
<p style="center;"><em>Figure 1 A 50% duty cycle PWM with an increasing frequency</em></p>
<p>Controlling the characteristics of this control signal can affect the operation of the emitted beam in various ways (see Table 1).</p>
<table border="1">
<caption>Table 1 Laser Control</caption>
<tbody>
<tr>
<th>Beam Characteristic</th>
<th>Description of Modification</th>
<th>Effect</th>
</tr>
<tr>
<td>PWM Duty Cycle</td>
<td>The on-time of the signal can be modified from 0 to 100 %</td>
<td>The on-time can effect the mark radius and line thickness of a beam&#8217;s result</td>
</tr>
<tr>
<td>Pulse Frequency</td>
<td>Vary the frequency of the PWM</td>
<td>The intensity of a laser can often be controlled with frequency.  This allows for various grayscale or even color imagery, and control of depth of cut.</td>
</tr>
</tbody>
</table>
<p>Galil can provide precision generation of the laser control signal.  Hardware acceleration and firmware integration provide high performance control that is accessible to the standard motion features of the Galil command set.</p>
<p>Once dynamic modification of laser characteristics is possible, a whole new world of options is opened up allowing for very sophisticated motion control.  The Galil pulse-on-position, also called output compare (See OC in the Command Reference), provides a super-accurate, hardware-based position synchronization for lasing the substrate at an exact position.  A laser imaging application might use PWM and Frequency control in concert with pulse-on-position to form a pixel-based raster image (see Figure 2).</p>
<p><a href="http://www.galilmc.com/techtalk/wp-content/uploads/2009/07/laser-marking-copy.png"><img class="aligncenter size-medium wp-image-107" src="http://www.galilmc.com/techtalk/wp-content/uploads/2009/07/laser-marking-copy-300x195.png" alt="" width="300" height="195" /></a></p>
<p style="center;"><em>Figure 2 The pixels of the Galil logo have exact horizontal and vertical centers as a result of Galil&#8217;s output compare.   The pixel radius is controlled by the PWM duty cycle of the laser control signal when it is pulsed.  The differences of pixel radii provide for the effect of image brightness.</em></p>
<p>To provide for the fastest possible performance, the stage must be moving at as fast a speed as mechanically possible.  This can be accomplished by providing a hardware-based pixel queue, or FIFO (First In, First Out).  Similar to a raster image processor (RIP) found in laser printers, an image can be transferred into pixels, with the requisite information including physical location of pulse, PWM duty cycle, and even PWM frequency.  This serves as a laser &#8220;bitmap&#8221; that can be queued and dequeued quickly from hardware to allow for even the fastest motions.</p>
<p>There are many, many more features available in Laser Control Options offered by Galil.  To discuss the options available for you application, including the details above, precise active-window control, vector speed synchronization, and more, contact Galil&#8217;s Applications Department today.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.galilmc.com/techtalk/motion-controllers/laser-control-options/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Alternative Feedback Options</title>
		<link>http://www.galilmc.com/techtalk/motion-controllers/alternative-feedback-options/</link>
		<comments>http://www.galilmc.com/techtalk/motion-controllers/alternative-feedback-options/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 17:46:41 +0000</pubDate>
		<dc:creator>Galil_JasonR</dc:creator>
		
		<category><![CDATA[Motion Controllers]]></category>

		<guid isPermaLink="false">http://www.galilmc.com/techtalk/?p=103</guid>
		<description><![CDATA[A majority of motion control systems that include feedback will use an incremental encoder. The draw back to incremental encoders is that upon power up the controller does not know the position of the motor in absolute terms. To compensate for this, system engineers will home a system upon power up by driving the motor [...]]]></description>
			<content:encoded><![CDATA[<p>A majority of motion control systems that include feedback will use an incremental encoder. The draw back to incremental encoders is that upon power up the controller does not know the position of the motor in absolute terms. To compensate for this, system engineers will home a system upon power up by driving the motor to a switch at a known location. This works well for many systems, but sometimes systems demand that the controller retain knowledge of the absolute position even during a power cycle. For these applications an absolute encoder is required.</p>
<p>Galil motion controllers have standard options for communicating to a number of different absolute encoder technologies. Resolver feedback is a common type of absolute feedback that has been used in motion control systems for a number of years. This can be advantageous in systems where the mechanics are subject to a harsh environment.</p>
<p>An older technology that is still used by some encoders is binary parallel encoders. These feedback devices work by toggling a specific number of bits that represent the absolute position to the motion controller. The draw back to a parallel encoder is that there is a wire for every bit, which can quickly become cumbersome when you look at encoders with 24 bits or more of resolution, especially with a multi-axes control system.</p>
<p>By far the most popular, SSI (Serial Synchronous Interface) feedback is offered by a number of different encoder manufacturers. The advantage to SSI technology is that it is quickly becoming an industry standard due to its ease of use and simple set up. Besides power and ground, there is only a clock and a data signal that need to be connected. Building on SSI, some encoder manufacturers support a BiSS (Bidirectional Serial Synchronous Interface) protocol now. These encoders offer the ability for the encoder to store information locally and transmit them to the motion controller. This builds on SSI which only allows encoder position information to be transmitted.</p>
<p>Another new-comer to the encoder protocol world is the Distance Coded Index. These types of encoders are quasi-absolute. The encoder track is lined with various index pulses that are specific distances apart. Upon power up, with two short moves in either direction, the encoder can read the index pulses and determine the absolute position.</p>
<p>There are many types of encoder protocols to choose from in the current marketplace and Galil motion controllers offer you the flexibility to choose the one that meets the needs of your system.  If you do not see the type of interface you require listed here, call Galil’s applications engineers to review your selected interface.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.galilmc.com/techtalk/motion-controllers/alternative-feedback-options/feed/</wfw:commentRss>
		</item>
		<item>
		<title>RTD and Thermocouple Interface for RIO Pocket PLC</title>
		<link>http://www.galilmc.com/techtalk/io-control/rtd-and-thermocouple-interface-for-rio-pocket-plc/</link>
		<comments>http://www.galilmc.com/techtalk/io-control/rtd-and-thermocouple-interface-for-rio-pocket-plc/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 22:21:44 +0000</pubDate>
		<dc:creator>John Hayes</dc:creator>
		
		<category><![CDATA[I/O Control]]></category>

		<category><![CDATA[48206]]></category>

		<category><![CDATA[48306]]></category>

		<category><![CDATA[RTD]]></category>

		<category><![CDATA[SCB]]></category>

		<category><![CDATA[temperature measurement]]></category>

		<category><![CDATA[Thermocouple]]></category>

		<guid isPermaLink="false">http://www.galilmc.com/techtalk/?p=95</guid>
		<description><![CDATA[Galil’s RIO Pocket PLC and new SCB interface for RTDs and thermocouples provide an easy method for precisely handling temperature control applications. The SCB-48206 Signal Conditioning Board interfaces to up to six RTDs (Resistive Temperature Device) and the SCB-48306 provides interface for up to six thermocouples.

The SCB-48&#215;06 connects directly to the 26-pin d-sub connector of [...]]]></description>
			<content:encoded><![CDATA[<p>Galil’s RIO Pocket PLC and new SCB interface for RTDs and thermocouples provide an easy method for precisely handling temperature control applications. The SCB-48206 Signal Conditioning Board interfaces to up to six RTDs (Resistive Temperature Device) and the SCB-48306 provides interface for up to six thermocouples.</p>
<p><a href="http://www.galilmc.com/techtalk/wp-content/uploads/2009/06/scb-with-rio.jpg"><img class="alignnone size-full wp-image-97" title="scb-with-rio" src="http://www.galilmc.com/techtalk/wp-content/uploads/2009/06/scb-with-rio.jpg" alt="" width="300" height="294" /></a></p>
<p>The SCB-48&#215;06 connects directly to the 26-pin d-sub connector of the RIO-47120 or RIO-47122 and is oriented vertically from the RIO connector. Other mounting options are available on request.</p>
<p><strong>RTD Measurement</strong><br />
An RTD is a Resistive Temperature Device that takes advantage of the fact that a material’s resistance changes as a function of temperature.  Most RTD elements consist of a fine coiled wire wrapped around a ceramic or glass core.  The RTD element is made from a pure material whose resistance at different temperatures is known.  Since the material used has a predictable change in resistance based on temperature – this is used to accurately measure temperature.  Typical materials used for RTD’s include: Platinum (most common), Nickel, Copper, Balco, or Tungsten.</p>
<p>Some benefits of RTDs are:<br />
•	Wide temperature range<br />
•	Good Accuracy (better than Thermocouples)<br />
•	Repeatability and resistance to electrical noise<br />
•	Long-Term stability (ie: aging)</p>
<p>RTDs are positive temperature coefficient (PTC) sensors which mean their resistance increases with temperature.</p>
<p><strong>Thermocouple Measurement</strong><br />
A thermocouple is based on the “thermoelectric effect” which occurs when two different metals are connected together – a voltage is produced that is dependant on the type of metals used and the temperature. In order for the thermal voltage to produce a current, the metals must be connected together at both ends so that a closed circuit is formed.  If the temperature is the same at both ends, there is no flow of current.  Thus, a thermocouple can only measure temperature differences.  For this reason, the reference junction temperature must be known for an accurate measurement to occur.  Since the reference temperature point is generally lower than the measured temperature – it is generally called the cold junction.  At the “cold junction” or reference junction, an RTD or similar temperature sensor is used to have an accurate reference temperature.  The voltage produced by a thermocouple is very small and amounts to only a few microvolts per degree Celsius.  Thermocouples are generally not used in applications in the range of       -30 to 50°C because the difference between the reference temperature and the measurement temperature is too small to get accurate noise-free signals.  However, compared with other sensors – thermocouples offer an advantage of a higher upper temperature limit and are therefore frequently used to measure temperatures in ovens, furnaces, etc.</p>
<p><strong>Example Applications</strong></p>
<p>Consider an HVAC application where a heating and air conditioning unit needs to be run in order to precisely control the temperature of a room.  The block diagram of this setup would look something like this when in the “heating” mode:</p>
<p><a href="http://www.galilmc.com/techtalk/wp-content/uploads/2009/06/scb-pid-loop.jpg"><img class="alignnone size-full wp-image-96" title="scb-pid-loop" src="http://www.galilmc.com/techtalk/wp-content/uploads/2009/06/scb-pid-loop.jpg" alt="" width="500" height="200" /></a></p>
<p>In this case a set-point is commanded by an external source and the RIO uses the internal PID filter to close the loop around the 100Ohm RTD.  An analog output from the RIO controls the heater such that when the temperature of the room lowers, an error is created between the set-point and the actual temperature measured by the RTD.  This error goes through the PID filter and increases the RIO voltage to the heater to raise the temperature of the room.  This cycle continues repeatedly to keep the room at the desired set-point.</p>
<p>At $175 in single quantity and $125 in 100 quantities, the SCB-48&#215;06 provides a cost-effective interface to RTDs and thermocouples.  Galil&#8217;s RIO Pocket PLC series is smart, compact, low cost and packed with I/O. Standard features include analog and digital I/O, Ethernet and RS232 ports, RISC processor for fast I/O handling, PID process control loops, counters, timers, data logging, ability to send email alerts, Power-over-Ethernet, and more. Visit <a href="http://www.galilmc.com/products/rio-47xxx.php" target="_blank">http://www.galilmc.com/products/rio-47xxx.php</a> to download complete specifications and view an on-line video about the RIO.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.galilmc.com/techtalk/io-control/rtd-and-thermocouple-interface-for-rio-pocket-plc/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
