<?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>Thu, 19 Jan 2012 18:43:53 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Using socket TCP/IP or UDP communication with Galil controllers</title>
		<link>http://www.galilmc.com/techtalk/software/using-socket-tcpip-or-udp-communication-with-galil-controllers/</link>
		<comments>http://www.galilmc.com/techtalk/software/using-socket-tcpip-or-udp-communication-with-galil-controllers/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 18:43:53 +0000</pubDate>
		<dc:creator>John Hayes</dc:creator>
		
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.galilmc.com/techtalk/?p=182</guid>
		<description><![CDATA[For most applications, the standard GalilTools communication libray or API (Application Programming Interface) provides the best method of communicating from either a Windows or Linux computer to a Galil controller.  The GalilTools communication library provides calls such as  &#8220;Command()&#8221; and &#8220;ProgramDownload()&#8221; that provide a wrapper to make it easier for a programmer to get up [...]]]></description>
			<content:encoded><![CDATA[<p>For most applications, the standard GalilTools communication libray or API (Application Programming Interface) provides the best method of communicating from either a Windows or Linux computer to a Galil controller.  The GalilTools communication library provides calls such as  &#8220;Command()&#8221; and &#8220;ProgramDownload()&#8221; that provide a wrapper to make it easier for a programmer to get up and running in their language of choice (C#, C++, VB, LabVIEW, etc&#8230;).  The GalilTools communication library handles the lower level driver functions and communication protocols so that the programmer doesn&#8217;t have to.  However, there are some situations in which it is necessary or required to communicate to a Galil controller without using the GalilTools communication library.  This article will discuss what a user should be aware of when creating their own communication interface.</p>
<p><strong>Part I - Standard Communication</strong></p>
<p><strong> </strong></p>
<p><strong>1) Opening a Socket</strong></p>
<p>Most programming languages that have an Ethernet interface have an &#8220;OpenSocket&#8221; type of function that will handle establishing the UDP or TCP/IP connection.  The arguments will usually be the IP address of the device you are connecting to as well as a port number.  For a standard connection to a Galil controller, the user should connect on port number 23 (Telnet).  Other port numbers are allowed such as those above port 1000 when needed for special applications.  See the IK command for more info.</p>
<p><strong>2) Sending a Command</strong></p>
<p>Once a socket is established, the user will need to send a Galil command as a string to the controller (via the opened socket) followed by a Carriage return (0&#215;0D).</p>
<p><strong>3) Receiving a Response</strong></p>
<p>The controller will respond to that command with a string.  The response of the command depends on which command was sent.  In general, if there is a response expected such as the &#8220;TP&#8221; Tell Position command.  The response will be in the form of the expected value(s) followed by a Carriage return (0&#215;0D), Line Feed (0&#215;0A), and a Colon (:).  If the command was rejected, the response will be just a question mark (?) and nothing else.  If the command is not expected to return a value, the response will be just the Colon (:).</p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong>4) Closing the Socket</strong></p>
<p>The socket should be left open during general operation to send/receive commands.  In order to close the connection, the programming language should have a &#8220;CloseSocket&#8221; that will close the TCP/IP connection to the controller.</p>
<p><strong>Notes:</strong></p>
<p>1) A single command should not exceed 80 characters, however multiple commands can be grouped together in a single packet by separating them with semicolons.</p>
<p>2) Packet size should not exceed 450bytes</p>
<p>3) See the Appendix of the Application Note to see example packets of sending commands and receiving responses</p>
<p>For the complete Application Note including part 2 on Advanced Communication, go here:</p>
<p><a href="http://www.galilmc.com/support/appnotes/software/note4434.pdf">http://www.galilmc.com/support/appnotes/software/note4434.pdf</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.galilmc.com/techtalk/software/using-socket-tcpip-or-udp-communication-with-galil-controllers/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Introducing GalilSuite Software</title>
		<link>http://www.galilmc.com/techtalk/software/introducing-galilsuite-software/</link>
		<comments>http://www.galilmc.com/techtalk/software/introducing-galilsuite-software/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 01:20:06 +0000</pubDate>
		<dc:creator>Galil_LisaW</dc:creator>
		
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.galilmc.com/techtalk/?p=180</guid>
		<description><![CDATA[Galil has recently released GalilSuite Software, a new version of GalilTools, providing a more powerful and flexible tool for configuring, analyzing and tuning Galil motion control systems. GalilSuite includes enhanced servo tuning capabilities with multiple tuning methods and allows the various analysis tools such as the scope, tuner and terminal tools to be executed individually. [...]]]></description>
			<content:encoded><![CDATA[<p>Galil has recently released GalilSuite Software, a new version of GalilTools, providing a more powerful and flexible tool for configuring, analyzing and tuning Galil motion control systems. GalilSuite includes enhanced servo tuning capabilities with multiple tuning methods and allows the various analysis tools such as the scope, tuner and terminal tools to be executed individually. The new software also allows multiple connections to be made from GalilSuite to multiple controllers. The GalilSuite software package provides five tools for working with Galil controllers:</p>
<p>Terminal - for entering and receiving controller commands</p>
<p>Editor - for writing, saving and executing application programs</p>
<p>Tuner - for selecting controller PID parameters for optimal servo system response</p>
<p>Scope - for plotting controller data such as motor position and velocity</p>
<p>Watch - for displaying controller and I/O status</p>
<p>In GalilSuite each of these tools are independent and can be launched and run individually. This feature makes it easier for the design engineer to create a flexible development environment for testing control systems. Individual tools can be shown in a full screen for the best viewing, while other tools may be minimized or not executed at all.</p>
<p>Enhanced features of the individual tools are described below. A DMC-4020 two-axis motion controller with AMP-43020 two-axis servo drive was used as a demo system to capture the data shown in the example screen shots below.</p>
<p><strong>Terminal Tool</strong><br />
<img src="http://www.galilmc.com/support/servotrends/st_01_12/images/Figure1-TerminalTool.jpg" alt="" /><br />
<strong>Figure 1: Terminal Tool Allows Easy Communication with Galil Controllers</strong></p>
<p>The Terminal Tool allows Galil&#8217;s 2-letter instructions to be easily sent to and from Galil controllers. <strong>Figure 1 </strong>demonstrates the command Tell Position (TP) being sent to the DMC-4020 motion controller along with the commands to return the PID values of KP, KI and KD. As shown, the Terminal offers a convenient drop-down box for uploading and downloading programs and arrays. A new feature of the Terminal Tool is the Command Helper with Syntax checker. The categories of Galil controller commands are displayed on the right side of the screen. Selecting a category brings up all the individual commands in that category. When a command is selected, a pop-up window shows the command definition and syntax. The Command Helper display may be toggled on or off.</p>
<p><strong>Editor Tool</strong><br />
<img src="http://www.galilmc.com/support/servotrends/st_01_12/images/Figure2-EditorTool.jpg" alt="" /><br />
<strong>Figure 2: Editor Tool For Writing Programs</strong></p>
<p>The Editor Tool allows controller programs to be opened, edited and saved. The enhanced editor is full featured and provides cut, paste, copy, insert and find/replace functions in addition to a syntax helper which includes label detection and syntax help. The new release includes buttons for executing, stopping, uploading and downloading programs. Another new feature of the editor is that it allows for a collection of programs to be saved in a project and multiple projects can be created. <strong>Figure 2 </strong>shows the new enhanced Editor Tool available in GalilSuite.</p>
<p><strong>Tuner Tool</strong><br />
<img src="http://www.galilmc.com/support/servotrends/st_01_12/images/Figure3-Auto-crossoverFrequencyTest.jpg" alt="" /><br />
<strong>Figure 3: Auto-crossover Frequency Test</strong></p>
<p>The Tuner Tool has many enhancements. It provides numerous methods for servo tuning including Crossover, General, Curve Follower and Manual that allows the user to select the optimum method for the system. The user can also select the final test profile as a sine wave, step response, profiled move or custom user code. For each method, the tuner scope captures and displays the controller command position, encoder position, position error and torque in response to the specified test profile.</p>
<p><strong> </strong></p>
<p><strong>Figure 3 </strong>displays the screen for the Crossover Tuning Method that measures the current system parameters and then calculates the appropriate KP, KI, and KD for the crossover frequency that is specified. In this method, the user specifies the pulse magnitude and duration in addition to the desired crossover frequency. <strong>Figure 3 </strong>illustrates the results of the crossover frequency tuning for a step response profile and a crossover frequency of 30 Hz. Following the automatic tuning, the command position, actual position, position error and torque waveforms are displayed along with the KP, KI, and KD values determined by the test. An auto-crossover frequency option is available where the system will try to determine the optimum crossover frequency for the system.</p>
<p>In the General Tuning Method the distance, speed, acceleration, deceleration and dwell time for the command profile are selected along with a range for KP, KI and KD values. The resulting waveforms for the command position, actual position, position error and torque waveforms are displayed along with the optimum KP, KI and KD values.</p>
<p><strong> </strong><br />
<img src="http://www.galilmc.com/support/servotrends/st_01_12/images/Figure4-CurveFollowerTuningMethod.jpg" alt="" /><br />
<strong>Figure 4: Curve Follower Tuning Method</strong></p>
<p><strong>Figure 4 </strong>shows the Curve Follower Tuner Method that is used to select the best PID values which result in a minimum following error along a curve. This method lets the user specify the magnitude and frequency of the impulse command. The tuning algorithm then calculates the best KP, KI and KD values and reports the best minimum error along a curve.</p>
<p><strong> </strong></p>
<p><strong>Figure 5 </strong>shows the screen for the Manual Tuner Method that allows the KP, KI and KD parameters to be manually adjusted for the best response. The Manual Method also has advanced settings that allow parameters such as feedforward, notch, poles and integrator limit to be specified.</p>
<p><img src="http://www.galilmc.com/support/servotrends/st_01_12/images/Figure5-ManualTuningMethodwithAdvancedSettings.jpg" alt="" /><br />
<strong>Figure 5: Manual Tuning Method with Advanced Settings</strong></p>
<p><strong>Scope Tool</strong><br />
<img src="http://www.galilmc.com/support/servotrends/st_01_12/images/Figure6-ScopeToolAllowsMultipleTraces.jpg" alt="" /><br />
<strong>Figure 6: Scope Tool Allows Multiple Traces to be Displayed</strong></p>
<p>The Scope Tool is easier to use and has more features than previous generations. One enhanced feature is that a virtually unlimited number of traces can be displayed. The scope also provides a drag and drop feature allowing selection of a parameter from the controller data record by dragging it into the scope display. The scope has better triggering for data capturing and a snap feature for viewing specific data points that have been captured. <strong>Figure 6 </strong>shows five different measurements of axis A being displayed on the Scope Tool: reference position, actual position, position error, velocity and torque. Note that the scale for each trace can be adjusted separately along with its position on the scope display. Many other types of data can also be selected for measurement and display including I/O status, Ethernet handle status and amplifier status.</p>
<p><strong>Watch Tool</strong><br />
<img src="http://www.galilmc.com/support/servotrends/st_01_12/images/Figure7-WatchToolDisplaysIO.jpg" alt="" /><br />
<strong>Figure 7: Watch Tool Displays I/O Status</strong></p>
<p>The improved Watch Tool provides an easy-to-read display of various controller data such as controller and amplifier status, I/O, and motion parameters. As seen in <strong>Figure 7</strong>, digital input and output status is displayed with virtual LEDs. Data such as axis position and error are shown in numeric format in a table. The update rate of the data capture is selectable.</p>
<p><strong>Ordering Information</strong></p>
<p>GalilSuite software is in BETA release and is available for free download to users of Galil controllers. GalilSuite currently works with Windows 7 or Windows XP operating systems (Mac and Linux support will be available in the future). More information and the BETA download can be found at: http://www.galilmc.com/support/software-downloads.php. Please contact a Galil application engineer at (800) 377-6329 or support@galilmc.com for more information.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.galilmc.com/techtalk/software/introducing-galilsuite-software/feed/</wfw:commentRss>
		</item>
		<item>
		<title>DMC-300xx Single-Axis Controller and 800W Sine Drive is now in Standard Release</title>
		<link>http://www.galilmc.com/techtalk/galil-news/dmc-300xx-single-axis-controller-and-800w-sine-drive-is-now-in-standard-release/</link>
		<comments>http://www.galilmc.com/techtalk/galil-news/dmc-300xx-single-axis-controller-and-800w-sine-drive-is-now-in-standard-release/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 01:18:28 +0000</pubDate>
		<dc:creator>Galil_MarkM</dc:creator>
		
		<category><![CDATA[Inside Galil]]></category>

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

		<guid isPermaLink="false">http://www.galilmc.com/techtalk/?p=181</guid>
		<description><![CDATA[Galil&#8217;s new DMC-300xx single-axis Ethernet Motion Controller Series is now out of beta release and is available as a standard product with CE certification. The DMC-300xx provides higher performance, better power efficiency, smaller size and a lower price than prior generation, single-axis controllers.

High performance features of the DMC-300xx include: 125 microsecond servo loop update period, [...]]]></description>
			<content:encoded><![CDATA[<p>Galil&#8217;s new DMC-300xx single-axis Ethernet Motion Controller Series is now out of beta release and is available as a standard product with CE certification. The DMC-300xx provides higher performance, better power efficiency, smaller size and a lower price than prior generation, single-axis controllers.</p>
<p><img src="http://www.galilmc.com/support/servotrends/st_01_12/images/DMC-30012-BOX.jpg" alt="" /></p>
<p>High performance features of the DMC-300xx include: 125 microsecond servo loop update period, 15MHz encoder frequency, non-volatile memory for user programs and multitasking for simultaneously running up to four user programs.</p>
<p>Modes of motion include point-to-point positioning, position tracking, jogging, contouring, electronic gearing, ECAM and PVT. The DMC-300xx includes two 100Base-T Ethernet ports in addition to an internal Ethernet hub that allows multiple units to be daisy-chained without the use of an external hub.</p>
<p>The DMC-30012 model is a controller packaged with an internal 800W sine drive for operating brushless motors at 20-80 VDC, up to 10 amps rms continuous, 15 amps peak.</p>
<p>The DMC-300xx is also available as a controller-only product that can be connected to an external stepper or servo drive of any power range.</p>
<p>The DMC-300xx provides optically isolated inputs and outputs as a standard feature including forward and reverse limit inputs, homing input, 8 uncommitted digital inputs, 4 uncommitted digital outputs, 2 uncommitted analog inputs and 1 uncommitted analog output. The DMC-300xx accepts both main and auxiliary quadrature encoders as standard, with BiSS and SSI formats available as an option.</p>
<p>The DMC-300xx series is both compact and low cost making it ideal for OEM projects.</p>
<p>The DMC-30012-BOX motion controller and 800W brushless sine drive unit measures 3.9&#8243; x 5.0&#8243; x 1.5&#8243; and is $695 U.S. in single quantity and $445 in quantities of 100.</p>
<p>Like all Galil controllers, the DMC-300xx is programmed with Galil&#8217;s intuitive, 2-letter command language, making it quick and easy to program. Galil&#8217;s command language has used the same 2-letter format for over 25 years and is similar across both single and multi-axis controller platforms. The GalilTools and new GalilSuite software simplifies system set-up with automated servo tuning and real-time display of motion information in the time domain.</p>
<p>The DMC-300xx is available for immediate shipment. For complete pricing and specifications for the DMC-300xx series, please see: <a href="http://www.galilmc.com/products/dmc-300xx.php">http://www.galilmc.com/products/dmc-300xx.php</a> or contact a Galil application engineer at (800) 377-6329 or <a href="mailto:support@galilmc.com">support@galilmc.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.galilmc.com/techtalk/galil-news/dmc-300xx-single-axis-controller-and-800w-sine-drive-is-now-in-standard-release/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Key Benefits of Galil High Performance Controller &#038; Drive Products</title>
		<link>http://www.galilmc.com/techtalk/motion-controllers/key-benefits-of-galil-high-performance-controller-drive-products/</link>
		<comments>http://www.galilmc.com/techtalk/motion-controllers/key-benefits-of-galil-high-performance-controller-drive-products/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 17:14:00 +0000</pubDate>
		<dc:creator>John Hayes</dc:creator>
		
		<category><![CDATA[Drives]]></category>

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

		<category><![CDATA[brushless servo drive]]></category>

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

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

		<category><![CDATA[sinusoidal commutation]]></category>

		<guid isPermaLink="false">http://www.galilmc.com/techtalk/?p=178</guid>
		<description><![CDATA[
A common shortcut with single axis controller/drive combinations is to use a single control loop (and processor) to handle both the Position Control Loop (ie: PID loop) and the Amplifier Current loop. Galil separates these two loops onto different hardware and therefore optimizes each of them for the highest system performance. For instance, on the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.galilmc.com/techtalk/wp-content/uploads/2011/10/300xx_sine-wave-motor.png"><img class="alignright size-full wp-image-179" title="300xx_sine-wave-motor" src="http://www.galilmc.com/techtalk/wp-content/uploads/2011/10/300xx_sine-wave-motor.png" alt="" width="341" height="211" /></a><br />
A common shortcut with single axis controller/drive combinations is to use a single control loop (and processor) to handle both the Position Control Loop (ie: PID loop) and the Amplifier Current loop. Galil separates these two loops onto different hardware and therefore optimizes each of them for the highest system performance. For instance, on the DMC-30012 and -D3540 sinusoidal amplifiers, the current loop is closed at a 33kHz sample rate that gives a fast response and tight control of the current going to the motor. It allows a high closed loop frequency response of 3-4kHz. This frees the controller processor for closing the position loop as well as running programs and processing commands. This two-loop architecture allows Galil to be extremely responsive and highly accurate on many different types of servo systems.</p>
<p><strong>Software Adjustable Settings to Interface to Many Different Servo Systems</strong><br />
Galil is able to achieve precise control over many different types of servo motors - (both brush and brushless) by allowing software-selectable control loop parameters (ie: PID) and amplifier current loop parameters. For instance, the gain of the amplifier is selectable using the AG command. This can be set for small, medium, or large motors and determines how much current is delivered to the motor. In addition, the controller&#8217;s AU command allows the user to adjust the current loop gain high or low. A high current loop gain is good for motors with large inductance values. On rare occasions, a very specific current loop setting is needed. Galil offers the capability of further customizing the controller/amplifier settings at the factory in order to precisely match a user&#8217;s servo system.</p>
<p><strong>Sinusoidal Commutation for Smooth Motion</strong><br />
For the smoothest mechanical output of a brushless servo motor (linear and rotary), sinusoidal commutation is the best method for minimizing torque ripple. On standard trapezoidal-based commutation, a small amount of torque ripple occurs when switching from one phase to the next. On some servo motor systems, this torque ripple affects the smoothness of motion and may have an audible component such as a &#8220;ticking&#8221; sound when transitioning between phases. Sinusoidal commutation comes standard on the DMC-30012 single axis controller and drive and is available as the -D3540 amplifier on multi-axis systems.</p>
<p><strong>Easy Setup and Integration</strong><br />
Several methods are available to commutate a brushless motor with the Galil sinusoidal drives. A short initialization procedure on power-up uses minimal motion and allows the controller to commutate a brushless motor using only the encoder feedback. This eliminates the need for Hall sensors. Removing the Hall sensors helps reduce cost and space of a motor while also making wiring and system setup easier. For systems where gravity or a constant force is present, Hall sensors may be required for proper commutation. On these systems, the controller can use them to initialize by simply moving past the first Hall transition. For further information on single or multi-axis controller and drive solutions, contact a Galil applications engineer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.galilmc.com/techtalk/motion-controllers/key-benefits-of-galil-high-performance-controller-drive-products/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using Notch Filters to Compensate for Resonance in Servo Motor Control Systems</title>
		<link>http://www.galilmc.com/techtalk/motion-controllers/using-notch-filters-to-compensate-for-resonance-in-servo-motor-control-systems/</link>
		<comments>http://www.galilmc.com/techtalk/motion-controllers/using-notch-filters-to-compensate-for-resonance-in-servo-motor-control-systems/#comments</comments>
		<pubDate>Mon, 22 Aug 2011 20:35:27 +0000</pubDate>
		<dc:creator>Galil_LisaW</dc:creator>
		
		<category><![CDATA[DMC Programming]]></category>

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

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

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

		<category><![CDATA[motion control]]></category>

		<category><![CDATA[motion controller]]></category>

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

		<category><![CDATA[notch filter]]></category>

		<category><![CDATA[pid tuning]]></category>

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

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

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

		<guid isPermaLink="false">http://www.galilmc.com/techtalk/?p=174</guid>
		<description><![CDATA[
Servo motor control systems with resonance often create difficult problems for designers because it causes the servo control system to over-shoot and oscillate.
An effective way to compensate for resonance in a servo system is the use of a notch filter in addition to the standard PID servo loop compensation. To understand the operation of a [...]]]></description>
			<content:encoded><![CDATA[<div class="Section1">
<p class="MsoNormal">Servo motor control systems with resonance often create difficult problems for designers because it causes the servo control system to over-shoot and oscillate.</p>
<p class="MsoNormal">An effective way to compensate for resonance in a servo system is the use of a notch filter in addition to the standard PID servo loop compensation. To understand the operation of a notch filter, note that every resonance is characterized by two parameters:<span> </span>the imaginary and the real part. The imaginary part sets the resonance frequency, whereas the real part sets the damping. The smaller the real part, the stronger the effect of the resonance.</p>
<p class="MsoNormal">A notch filter replaces one resonance with another. It places an anti-resonance on top of the existing resonance, and adds another resonance in a different location. For example, suppose the resonance has a frequency of 100 Hz and a real part of 5. The notch cancels this resonance and replaces it by one with a real part of 40. The increase in the real part results in a damped resonance.</p>
<p class="MsoNormal">You may ask what happens if the resonance cancellation is not perfect, or if the resonance parameters change over time? It turns out that the presence of an anti-resonance near the resonance results in a significant attenuation effect.</p>
<p class="MsoNormal">The mathematical behavior of the resonance is described by a pair of complex poles in the transfer function. The anti-resonance effect is done by a pair of complex zeros. The notch filter includes a pair of zeros to cancel the resonance and a pair of poles to set the new resonance.</p>
<p class="MsoNormal">The digital notch function is available in all new Galil servo motor controllers such as the DMC-40&#215;0 Accelera motion controllers and DMC-41&#215;3 Econo motion controllers. Users can program the resonance frequency with the instruction NF, the real part of the zeros with NZ, and the real part of the poles with the command NB. For more information, refer to App Note 2431 <a href="http://www.galilmc.com/support/application-notes.php">http://www.galilmc.com/support/application-notes.php</a>. Galil’s new Frequency Analysis Software is useful for tuning servo motor control systems in the frequency domain and compensating for system resonance.</p>
</div>
<p><span><br />
</span></p>
<p class="MsoNormal">
]]></content:encoded>
			<wfw:commentRss>http://www.galilmc.com/techtalk/motion-controllers/using-notch-filters-to-compensate-for-resonance-in-servo-motor-control-systems/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Servo Amplifier Types - Linear and Pulse Width Modulated (PWM)</title>
		<link>http://www.galilmc.com/techtalk/drives/servo-amplifier-types-linear-and-pulse-width-modulated-pwm/</link>
		<comments>http://www.galilmc.com/techtalk/drives/servo-amplifier-types-linear-and-pulse-width-modulated-pwm/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 16:05:25 +0000</pubDate>
		<dc:creator>Galil_LisaW</dc:creator>
		
		<category><![CDATA[Drives]]></category>

		<category><![CDATA[linear amplifier]]></category>

		<category><![CDATA[pulse width modulated amplifier]]></category>

		<category><![CDATA[pwm amplifier]]></category>

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

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

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

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

		<guid isPermaLink="false">http://www.galilmc.com/techtalk/?p=170</guid>
		<description><![CDATA[
This post describes two types of servo amplifiers used to drive DC and brushless DC servo motors: linear and pulse-width-modulated (PWM) servo amplifiers.
Linear servo amplifiers apply the full voltage across the power transistors which results in high power dissipation and higher heating. For this reason, linear servo amplifiers are typically used in applications requiring less [...]]]></description>
			<content:encoded><![CDATA[<p><!--[if !mso]></p>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<p><![endif]--><!--[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]--><!--[if gte mso 10]></p>
<style>
 /* Style Definitions */
 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>
<p><![endif]--></p>
<p class="MsoNormal" style="line-height: 150%;">This post describes two types of servo amplifiers used to drive DC and brushless DC servo motors: linear and pulse-width-modulated (PWM) servo amplifiers.</p>
<p class="MsoNormal" style="line-height: 150%;">Linear servo amplifiers apply the full voltage across the power transistors which results in high power dissipation and higher heating. For this reason, linear servo amplifiers are typically used in applications requiring less than 100 watts or when switching cannot be tolerated in applications. PWM servo amplifiers switch the voltage across the power transistors off-and-on so that the required average voltage is achieved. This results in less power dissipation and more efficiency making PWM servo amplifiers much more common than linear amplifiers.</p>
<p class="MsoNormal" style="line-height: 150%;">The two common approaches for switching in PWM amplifiers are the bipolar and unipolar methods. The bipolar method has the advantage of being more linear around zero voltage but has the disadvantage of requiring both plus and minus supply voltages to be used<span>. </span></p>
<p class="MsoNormal" style="line-height: 150%;">The effect of the switching on the current waveform is analyzed and the resulting worst-case ripple on the current waveform for the bipolar method with a 50% duty cycle is found to be:</p>
<p class="MsoNormal" style="line-height: 150%;"><a href="http://www.galilmc.com/techtalk/wp-content/uploads/2011/08/equation-servo-amplifier1.jpg"><img class="alignnone size-full wp-image-172" title="equation-servo-amplifier1" src="http://www.galilmc.com/techtalk/wp-content/uploads/2011/08/equation-servo-amplifier1.jpg" alt="" width="105" height="97" /></a></p>
<p class="MsoNormal" style="line-height: 150%;"><span> </span>Where:</p>
<p class="MsoNormal" style="line-height: 150%;"><span> </span>B – Peak-to-peak current variation</p>
<p class="MsoNormal" style="line-height: 150%;"><span> </span>V<sub><span style="font-family: ">s</span></sub> – Supply voltage</p>
<p class="MsoNormal" style="line-height: 150%;"><span> </span>T – Switching period</p>
<p class="MsoNormal" style="line-height: 150%;"><span> </span>L – Armature inductance</p>
<p class="MsoNormal" style="line-height: 150%;">Such current waveform ripples add to the winding losses in the servo motor.<span> </span>The added losses equal,</p>
<p class="MsoNormal" style="line-height: 150%;"><a href="http://www.galilmc.com/techtalk/wp-content/uploads/2011/08/equation2-servo-amplifier.jpg"><img class="alignnone size-full wp-image-173" title="equation2-servo-amplifier" src="http://www.galilmc.com/techtalk/wp-content/uploads/2011/08/equation2-servo-amplifier.jpg" alt="" width="136" height="91" /></a></p>
<p class="MsoNormal" style="line-height: 150%;">Where:</p>
<p class="MsoNormal" style="line-height: 150%;"><span> </span>P<sub><span style="font-family: ">r </span></sub>– Added power losses in watts</p>
<p class="MsoNormal" style="line-height: 150%;"><span> </span>R – Armature resistance</p>
<p class="MsoNormal" style="line-height: 150%;">Additional information and equations can be found in Galil’s on-line, audio/visual tutorial titled “Servo Amplifier Basics” at <a href="../../training/webconf.html">http://www.galilmc.com/training/webconf.html</a></p>
<p class="MsoNormal">
]]></content:encoded>
			<wfw:commentRss>http://www.galilmc.com/techtalk/drives/servo-amplifier-types-linear-and-pulse-width-modulated-pwm/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Minimizing Servo Motor Temperature in Optimal Design of Motor Control Systems</title>
		<link>http://www.galilmc.com/techtalk/motors/minimizing-servo-motor-temperature-in-optimal-design-of-motor-control-systems/</link>
		<comments>http://www.galilmc.com/techtalk/motors/minimizing-servo-motor-temperature-in-optimal-design-of-motor-control-systems/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 15:05:20 +0000</pubDate>
		<dc:creator>Galil_LisaW</dc:creator>
		
		<category><![CDATA[Motors]]></category>

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

		<category><![CDATA[optimal design of servo systems]]></category>

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

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

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

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

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

		<category><![CDATA[temperature rise servo motors]]></category>

		<guid isPermaLink="false">http://www.galilmc.com/techtalk/?p=167</guid>
		<description><![CDATA[


The ability of a servo motor to perform the required moves within short times is limited by the temperature rise that results from the power dissipation. It follows, then, that the optimal design of a servo motor control system, which maximizes the system throughput, is the one that results in minimum servo motor temperature.
This post [...]]]></description>
			<content:encoded><![CDATA[<p><!--[if !mso]></p>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<p><![endif]--><!--[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]--><!--[if !mso]><span class="mceItemObject"   classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui></span></p>
<style>
st1\:*{behavior:url(#ieooui) }
</style>
<p><![endif]--><!--[if gte mso 10]></p>
<style>
 /* Style Definitions */
 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>
<p><![endif]--></p>
<p class="MsoBodyText" style="margin-left: -9pt;"><span style="font-size: 14pt;"><br />
</span></p>
<p class="MsoNormal" style="line-height: 150%;">The ability of a servo motor to perform the required moves within short times is limited by the temperature rise that results from the power dissipation.<span> </span>It follows, then, that the optimal design of a servo motor control system, which maximizes the system throughput, is the one that results in minimum servo motor temperature.</p>
<p class="MsoNormal" style="line-height: 150%;">This post addresses the optimal design of a servo motor control system.<span> </span>It assumes a required motion of given length, and seeks the design that accomplishes the required move within a specified time, while minimizing the servo motor temperature.</p>
<p class="MsoNormal" style="line-height: 150%;">The analysis addresses three areas that affect the servo motor temperature.<span> </span>These include:</p>
<p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in; line-height: 150%;"><span>a.<span style="font: 7pt "> </span></span>Servo motor velocity profile</p>
<p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in; line-height: 150%;"><span>b.<span style="font: 7pt "> </span></span>Coupling ratio between the servo motor and the load</p>
<p class="MsoNormal" style="margin-left: 0.75in; text-indent: -0.25in; line-height: 150%;"><span>c.<span style="font: 7pt "> </span></span>Best servo motor selection</p>
<p class="MsoNormal" style="line-height: 150%;">In searching for the best velocity profile, it was found that a parabolic profile is optimal, as it results in minimum power dissipation.<span> </span>Specifically, it was found that a rotary move of θ radians, performed in T seconds, results in an energy dissipation of E Joules in the servo motor.</p>
<p class="MsoNormal" style="line-height: 150%;"><span> </span><span> </span><!--[if !mso]></p>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<p><![endif]--><!--[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]--><!--[if gte mso 10]></p>
<style>
 /* Style Definitions */
 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>
<p><![endif]--><span> </span><!--[if !mso]></p>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<p><![endif]--><!--[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]--><!--[if gte mso 10]></p>
<style>
 /* Style Definitions */
 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>
<p><![endif]--><img src="file:///C:/DOCUME~1/lisa/LOCALS~1/Temp/moz-screenshot-46.png" alt="" /><img src="file:///C:/DOCUME~1/lisa/LOCALS~1/Temp/moz-screenshot-47.png" alt="" /><a href="http://www.galilmc.com/techtalk/wp-content/uploads/2011/08/equation-optimal.jpg"><img class="alignnone size-full wp-image-168" title="equation-optimal" src="http://www.galilmc.com/techtalk/wp-content/uploads/2011/08/equation-optimal.jpg" alt="" width="121" height="62" /></a><span> </span></p>
<p class="MsoNormal" style="line-height: 150%;"><span> </span>Where:</p>
<p class="MsoNormal" style="line-height: 150%;"><span> </span>R – Armature resistance of servo motor</p>
<p class="MsoNormal" style="line-height: 150%;"><span> </span>J – Total moment of inertia of the servo motor and the load</p>
<p class="MsoNormal" style="line-height: 150%;"><span> </span>K<sub><span style="font-family: ">t</span></sub> – Torque constant of servo motor</p>
<p class="MsoNormal" style="line-height: 150%;">
<p class="MsoNormal" style="line-height: 150%;">When a parabolic profile is not possible, a trapezoidal profile can be used.<span> </span>It was found that the best trapezoidal velocity profile is the one where all three time intervals of acceleration, slew and deceleration are equal.<span> </span>In that case, the resulting dissipation is 12% larger than in the optimal case.</p>
<p class="MsoNormal" style="line-height: 150%;">The second area of optimization is the coupling between the servo motor and the load.<span> </span>When it is possible to select the relative ratio between the speeds of the servo motor and the load, it is found that the best coupling ratio is one were the reflected load inertia equals the inertia of the servo motor. This is known as inertial match.</p>
<p class="MsoNormal" style="line-height: 150%;">The final area of optimization is the selection of the servo motors.<span> </span>It was found that if the servo motor is to be coupled to the load under inertial match ratio, then the best motor is one where the following quantity is a minimum.</p>
<p class="MsoNormal" style="line-height: 150%;"><span> </span><a href="http://www.galilmc.com/techtalk/wp-content/uploads/2011/08/equation2-optimal.jpg"><img class="alignnone size-full wp-image-169" title="equation2-optimal" src="http://www.galilmc.com/techtalk/wp-content/uploads/2011/08/equation2-optimal.jpg" alt="" width="74" height="60" /></a><span> </span></p>
<p class="MsoNormal" style="line-height: 150%;">Where:</p>
<p class="MsoNormal" style="line-height: 150%;"><span> </span>R – Armature resistance of servo motor</p>
<p class="MsoNormal" style="line-height: 150%;"><span> </span>J<sub><span style="font-family: ">m</span></sub> – Moment of inertia of servo motor</p>
<p class="MsoNormal" style="line-height: 150%;"><span> </span>R<sub><span style="font-family: ">th</span></sub> – Thermal resistance of servo motor</p>
<p class="MsoNormal" style="line-height: 150%;"><span> </span>K<sub><span style="font-family: ">t</span></sub> – Torque constant of servo motor</p>
<p class="MsoNormal" style="line-height: 150%;">Additional information and equations can be found in Galil’s on-line, audio/visual tutorial titled “Optimal Design of Motion Control Systems” <a href="../../training/webconf.html">http://www.galilmc.com/training/webconf.html</a></p>
<p class="MsoBodyText" style="text-align: justify;">
<p class="MsoNormal">
<p class="MsoNormal">
]]></content:encoded>
			<wfw:commentRss>http://www.galilmc.com/techtalk/motors/minimizing-servo-motor-temperature-in-optimal-design-of-motor-control-systems/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Trapezoidal vs Sinusoidal Brushless Servo Amplifiers</title>
		<link>http://www.galilmc.com/techtalk/motion-controllers/sinusoidal-vs-trapezoidal-commutation-of-brushless-motors/</link>
		<comments>http://www.galilmc.com/techtalk/motion-controllers/sinusoidal-vs-trapezoidal-commutation-of-brushless-motors/#comments</comments>
		<pubDate>Thu, 30 Jun 2011 18:08:44 +0000</pubDate>
		<dc:creator>John Hayes</dc:creator>
		
		<category><![CDATA[Drives]]></category>

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

		<category><![CDATA[brushless servo drive]]></category>

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

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

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

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

		<category><![CDATA[sinusoidal commutation]]></category>

		<category><![CDATA[sinusoidal drive]]></category>

		<category><![CDATA[trapezoidal commutation]]></category>

		<category><![CDATA[trapezoidal drive]]></category>

		<guid isPermaLink="false">http://www.galilmc.com/techtalk/?p=166</guid>
		<description><![CDATA[The new Galil Sine drive amplifiers are a welcome addition to the existing DMC-40&#215;0 and DMC-41&#215;3 line-up of servo and stepper amplifiers - yet the addition of the new amplifiers also brings up a question  - &#8220;When should I use a sinusoidal drive instead of a trapezoidal drive?&#8221;.  This article will go over the Galil [...]]]></description>
			<content:encoded><![CDATA[<p>The new Galil Sine drive amplifiers are a welcome addition to the existing DMC-40&#215;0 and DMC-41&#215;3 line-up of servo and stepper amplifiers - yet the addition of the new amplifiers also brings up a question  - &#8220;When should I use a sinusoidal drive instead of a trapezoidal drive?&#8221;.  This article will go over the Galil brushless servo drive architecture and highlight what you should know when making an amplifier selection.</p>
<p><strong>Two </strong><strong>Loop</strong><strong> Architecture</strong></p>
<p>In order to gain a better understanding of servo amplifiers and specifically how the Galil servo amplifiers work, the first thing to do is to understand the Controller/Amplifier architecture.  Unlike most single axis drives on the market, Galil uses a split sample rate.  The first and highest speed sample rate occurs on the amplifier and is used on the current loop.  The D3540 Sinusoidal amplifier runs its current loop at 33 kHz and the D3040 Trapezoidal amplifier runs at 66 kHz (which can be increased to 120 kHz for low inductance applications).  The benefits of a high speed current loop are:</p>
<p>Fast response to desired current/velocity command signal</p>
<p>Less destabilizing phase shift on the position loop</p>
<p>Tighter more accurate control - 16bit resolution</p>
<p>High Closed Loop Frequency (3-4 kHz)</p>
<p>The second loop in the system is the position loop.  Because of the limitations of real world mechanics, a position loop generally has a closed loop frequency in the range of 20 to 200 Hz.  The sample rate required to achieve this is only from 1 kHz to 4 kHz.  Note that the DMC-4000 can have a sample rate of up to 16 kHz and can control up to 8 axes allowing all axes to be tightly coupled.  General motion control applications run optimally at a 1 kHz position loop update.  High performance and high resolution applications can be run at higher rates depending on the required performance.</p>
<p>Separate processors for the Amplifier and Controller allow for this two loop Architecture which allows Galil to be extremely responsive and highly accurate and also perform whatever functions are required in a user&#8217;s application.</p>
<p><strong>Trapezoidal vs. Sinusoidal Commutation</strong></p>
<p>Trapezoidal commutation is the most cost effective way of controlling a brushless servo motor.  It is perfect for higher speed applications and applications where the motor and mechanics will eliminate the torque ripple that occurs during switching current from one phase to the next.  Hall sensors are required for Trapezoidal commutation.</p>
<p>Sinusoidal commutation is great for lower speed, direct drive or linear motor applications where the torque ripple of the motor phases needs to be minimized.  Since the current to the motor phases are weighted as sine waves, the torque going through the motor is smooth and has minimal ripple. It also allows the mechanics to be simplified because Hall sensors can be eliminated.</p>
<p>Sinusoidal amplifiers rely on an initialization sequence at power-up to provide the correct commutation.  This can be done in one of 3 ways on the Galil.    The first and most common method is the BX command that uses an algorithm that energizes the phases and determines the brushless angle.  Only a small amount of motion (if any) is shown with this method.  The second method is to use the BC command that requires Hall sensors to be hooked up.  It will move the motor and use the first hall transition as the basis for the commutation.  This method is necessary if there is an external force on the motor such as a gravity load.  The third method uses the BZ command to drive the motor to the zero degree commutation point which can result in a jump to the closest zero phase.  For detailed information on getting started with the Galil Sine Drives, please see <a href="http://www.galilmc.com/support/appnotes/accelera/note1501.pdf">Application Note #1501</a></p>
<p><strong>More info on Galil Sinusoidal Amplifiers</strong><br />
The new AMP-43540 drives four brushless motors operating at up to 8 Amps continuous, 15 Amps peak, 20-80 VDC. The gain settings of the amplifier are user-programmable at 0.4, 0.8, and 1.6 Amp/Volt.  The amplifier offers protection for over-voltage, under-voltage, over-current, short-circuit and over temperature. A shunt regulator option is available.  For more information, please see:<br />
<a href="http://www.galilmc.com/products/dmc-40x0.php">DMC-40&#215;0 Product Page</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.galilmc.com/techtalk/motion-controllers/sinusoidal-vs-trapezoidal-commutation-of-brushless-motors/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Generating a random number on a DMC motion controller</title>
		<link>http://www.galilmc.com/techtalk/miscellaneous/generating-a-random-number-on-a-dmc-controller/</link>
		<comments>http://www.galilmc.com/techtalk/miscellaneous/generating-a-random-number-on-a-dmc-controller/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 20:59:30 +0000</pubDate>
		<dc:creator>Galil_StephenO</dc:creator>
		
		<category><![CDATA[DMC Programming]]></category>

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

		<category><![CDATA[random number generator]]></category>

		<guid isPermaLink="false">http://www.galilmc.com/techtalk/?p=165</guid>
		<description><![CDATA[Sometimes it is desirable to be able to generate a random number inside a Galil motion controller. This may used as a foundation for simulating possible IO configurations, testing truly random move lengths, making variable wait times, or other purposes. There are two types of possible random number generations, programatic and physical.
Programatic number generators would [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes it is desirable to be able to generate a random number inside a Galil motion controller. This may used as a foundation for simulating possible IO configurations, testing truly random move lengths, making variable wait times, or other purposes. There are two types of possible random number generations, programatic and physical.</p>
<p>Programatic number generators would take a certain value, typically called the seed value, and perform an algorithm to generate a new number. This seed value is preferred to be changing and somewhat random in order to make the numbers more variable. For this reason, we can use the internal servo clock counter as a seed value for the algorithm. Use of the modulus command ( the &#8216;%&#8217; command in the DMC-40&#215;0, 41&#215;3 and RIO) is used to make sure the random number stays within a range. A simple example of a calculation like this may look like the following.</p>
<p><code>#A<br />
range=1000 ;' maximum value for random number<br />
a= 4.7 ;' random multiplier, any nonzero number<br />
b= 123 ;' random adder, any nonzero number<br />
#RANDOM<br />
num= ((TIME * a) + b) % range<br />
EN<br />
</code></p>
<p>While this will work, the results from these computations are typically not truly random. This is because of multiple factors, including the fact that calling this function at an expected rate causes the seed value to increment at a known rate. However, this variation does give some random-ness for the range specified.</p>
<p>Physical number generation requires a seed value that is truly non-deterministic to be entered into the system and used in the algorithm to help generate a number. An example of this would be measuring variations on an analog input that were not deterministic (ie. measuring white noise on a floating analog input line). Since most of the controllers analog inputs are by default floating, measuring them gives us slight variation each time we measure that cannot be easily predicted. Further, by adding our programmatic seed value back in, we can make a more robust random number generator.</p>
<p>The following is an example of using a random number generator with a physical input to generate random position values to reach.</p>
<p><code><br />
range=5000 ;' maximum value for random number<br />
#MAIN<br />
JS#RANDOM<br />
PA num ;'move to random position in specified range<br />
BGX<br />
AMX<br />
WT100 ;'wait 100msec for next move<br />
JP#MAIN<br />
EN<br />
'<br />
#RANDOM<br />
' AN[1] is floating/has white noise input.<br />
&#8216; range of 0-4999 for random number<br />
num= @INT[(TIME * @AN[1]) % range]<br />
RE<br />
</code></p>
<p>The routine #RANDOM in the code above can be called whenever a new random number needs to be generated. Even if it is called at a specified time interval, the variability of @AN[1] will prevent the random number generation from having a cyclical repeat.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.galilmc.com/techtalk/miscellaneous/generating-a-random-number-on-a-dmc-controller/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Controller-driven network data storage (Windows example)</title>
		<link>http://www.galilmc.com/techtalk/galil-news/controller-driven-network-data-storage-windows-example/</link>
		<comments>http://www.galilmc.com/techtalk/galil-news/controller-driven-network-data-storage-windows-example/#comments</comments>
		<pubDate>Thu, 14 Apr 2011 22:46:14 +0000</pubDate>
		<dc:creator>Galil_DJR</dc:creator>
		
		<category><![CDATA[Inside Galil]]></category>

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

		<category><![CDATA[network data storage]]></category>

		<guid isPermaLink="false">http://www.galilmc.com/techtalk/?p=164</guid>
		<description><![CDATA[It is often desirable to create reports or provide data collection for a Galil motion controller or PLC. Galil hardware provides array and variable data for local storage, but in some cases the amount of data, or length of collection time is large enough that an external storage medium, such as a hard drive, is [...]]]></description>
			<content:encoded><![CDATA[<p>It is often desirable to create reports or provide data collection for a Galil motion controller or PLC. Galil hardware provides array and variable data for local storage, but in some cases the amount of data, or length of collection time is large enough that an external storage medium, such as a hard drive, is more convenient. The following is a simple example of using Ncat to provide data archival capabilities on a network attached Windows computer. Although these examples are for Windows, Ncat is available on many other operating systems.</p>
<p>&#8220;Ncat is a feature-packed networking utility which reads and writes data across networks from the command line.&#8221; <a title="http://nmap.org/ncat/" href="http://nmap.org/ncat/" target="_blank">http://nmap.org/ncat/</a></p>
<p>Download and install Ncat on your system.  The following Windows batch file will run Ncat in a loop to continuously listen for connection requests from your controller. Connections on port 1024 will be handled and the controller&#8217;s output will be sent to dmclog.csv.</p>
<pre>@echo off
:loop
REM Change the IP address to match your IP
"C:\Program Files\Nmap\ncat.exe" -l  192.168.123.100 -p 1024 &gt;&gt; dmclog.csv
goto loop</pre>
<p>The following DMC code is run on the controller. It connects to Ncat, sends 5 pieces of information in comma separated value (CSV) format 100 times and then closes the connection.</p>
<pre>IHH=192,168,123&lt;1024&gt;2
WT10;'wait for TCP handshake
i=0
#loop
'Report back some useful data
CW2;'Message data in ASCII
MG{EH}TIME,",",_TPA,",",_RPA,",",_TTA,",",_TEA
CW1;'Message data in Galil ASCII
WT10
i=i+1
JP#loop,i&lt;100
IHH=&gt;-2
WT10;'wait for TCP tear down
MG"Done"
EN</pre>
<p>Once the DMC code runs, returning &#8220;Done,&#8221; issue a ctrl-C to the Windows Batch file to stop the listening loop. dmclog.csv can then be opened in Open Office Calc, Microsoft Excel, or similar. The connection established to Ncat can last indefinitely, be opened and closed at will, and will save all data sent to it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.galilmc.com/techtalk/galil-news/controller-driven-network-data-storage-windows-example/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

