<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
   <title>In Control</title>
   <link rel="alternate" type="text/html" href="http://www.splatco.com/blogs/david/" />
   <link rel="self" type="application/atom+xml" href="http://www.splatco.com/blogs/david/atom.xml" />
   <id>tag:www.splatco.com,2009:/blogs/david//1</id>
   <updated>2009-03-31T01:44:33Z</updated>
   <subtitle>About embedded electronic control systems.
David Gibson, SPLat Controls</subtitle>
   <generator uri="http://www.sixapart.com/movabletype/">Movable Type 3.33</generator>

<entry>
   <title>Dimmable LCD backlights</title>
   <link rel="alternate" type="text/html" href="http://www.splatco.com/blogs/david/2009/03/dimmable_lcd_backlights.html" />
   <id>tag:www.splatco.com,2009:/blogs/david//1.94</id>
   
   <published>2009-03-31T01:40:12Z</published>
   <updated>2009-03-31T01:44:33Z</updated>
   
   <summary>New features extend life of LCD backlights</summary>
   <author>
      <name></name>
      
   </author>
         <category term="Tech Briefs" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://www.splatco.com/blogs/david/">
      We have become aware that some customers are running SPLat controllers with backlit LCDs 24/7.  That can result in eventual loss of backlight intensity, as the lifetime of small white LEDs is around 3,000 hours (an inherent limitation of current technology). We have therefore put on our thinking caps and engineered some ways of extending the backlight lifetime by dimming or switching off the backlight when it&apos;s not being viewed.
      <![CDATA[For the MS120 a simple firmware upgrade (reFlash) and modification to your SPLat program will provide timed automatic dimming to one of 8 levels, with the brightness restored to full whenever a front panel button is pushed. It has, incidentally, always been possible to turn off the MS120 backlight, so a simple MultiTrack task can manage the backlight without affecting any other part of your SPLat program.

For the MMi202 we have devised a modification to the LCD module that makes it, too, dimmable. Used in conjunction with a firmware upgrade (reFlash) this will provide the same features as described above for the MS120. We are now offering dimmable LCD modules in both 2x16 and 4x20 formats, and will be shipping dimmable ones in the MMi202cDK216 in the future.

This is all documented in the latest, online, version of the SPLat Knowledge Base, including detailed <a href="http://splatco.com/skb/4461.htm">program examples</a> you can simply cut and paste into your own code.
]]>
   </content>
</entry>
<entry>
   <title>Solar powered air conditioner</title>
   <link rel="alternate" type="text/html" href="http://www.splatco.com/blogs/david/2009/01/solar_powered_air_conditioner.html" />
   <id>tag:www.splatco.com,2009:/blogs/david//1.93</id>
   
   <published>2009-01-29T02:02:15Z</published>
   <updated>2009-01-29T04:23:07Z</updated>
   
   <summary>A solar powered air conditioner isn&apos;t really practical, is it? Well it is, and one of our customers did it. Coolerado, in Denver, Colorado, have made just that. In fact, it just helped them win the Colorado Governor’s Excellence in...</summary>
   <author>
      <name></name>
      
   </author>
         <category term="News" scheme="http://www.sixapart.com/ns/types#category" />
         <category term="Preserving our Planet" scheme="http://www.sixapart.com/ns/types#category" />
         <category term="SPLat applications and customers" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://www.splatco.com/blogs/david/">
      A solar powered air conditioner isn&apos;t really practical, is it? Well it is, and one of our customers did it. Coolerado, in Denver, Colorado, have made just that. In fact, it just helped them win the Colorado Governor’s Excellence in Renewable Energy Award for 2008 (they won the small business category, but I am confident they
      <![CDATA[ will soon need to compete in the big business category!)
<BR><BR>
Coolerado make air conditioners that use evaporation of water <em>but add no humidity to the product air</em>. How they work this neat trick you can look up for yourself on <a href="http://coolerado.com" target="_blank">the Coolerado website</a>, but believe me it works; I've been there in Denver and felt the cool air flowing out of a small box with a 1500W heater blowing hot air into it. 
<BR><BR>
Now they have gone one better and made a solar powered air conditioner. Making a solar powered air conditioner is just amazing. Cooling the PV panels the way they do it is simply inspired. This is creative engineering at its best! Take a look for yourself on YouTube and see how they did it.
<object width="480" height="295"><param name="movie" value="http://www.youtube.com/v/eO0pG7m4XJI&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/eO0pG7m4XJI&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="295"></embed></object>
<BR><BR>
Of all our OEM customers, doing a variety of ingenious and interesting things with our controllers, we are especially proud and excited to be associated with the Coolerado air conditioners. It is a truly standout product that demonstrates convincingly that we can be be environmentally responsible world citizens without necessarily giving up our creature comforts.]]>
   </content>
</entry>
<entry>
   <title>Tech Support: Isolating outputs, reliability</title>
   <link rel="alternate" type="text/html" href="http://www.splatco.com/blogs/david/2008/12/isolating_outputs_reliability.html" />
   <id>tag:www.splatco.com,2007:/blogs/david//1.35</id>
   
   <published>2008-12-03T00:44:46Z</published>
   <updated>2008-12-03T01:31:38Z</updated>
   
   <summary>Peter wrote: I need 4 isolated outputs operating on 24V. Outputs will be changing state 24 x 7 for many years. My thoughts were opto isolator transistor drivers. The intended controller is a MS120. This controller is going into an...</summary>
   <author>
      <name></name>
      
   </author>
         <category term="Tech support questions" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="44" label="dust" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="42" label="heat" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="45" label="humidity" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="41" label="isolation" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="6" label="motor" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="47" label="relay" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="46" label="solenoid" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="43" label="vibration" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://www.splatco.com/blogs/david/">
      <![CDATA[Peter wrote: 

<blockquote><strong>I need 4 isolated outputs operating on 24V. Outputs will be changing state 24 x 7 for many years. My thoughts were opto isolator transistor drivers.

The intended controller is a MS120.

This controller is going into an industrial situation and will be critical to monitoring production. Do you have any reliability recommendations?</strong></blockquote>

Reply:

Hi Peter,

You didn't mention what the isolated outputs are to drive. Assuming its something with a bit of power, I suggest you look at DC solid state relays. Google for "<a target="_blank" href="http://www.google.com/search?q=dc+solid+state+relays&ie=UTF-8">DC solid state relays</a>"

As to reliability, the most important things are: 
]]>
      <![CDATA[<UL><LI>Isolate electronics from nasty environmental factors like heat, vibration, dust, humidity (condensation) and electrical abuse ("sparks and spikes").
<LI>Make sure any nasty aspects of the load are properly taken into account. That means you must understand what the load is and does.<UL><LI>Motors produce inductive kick-backs
<LI>Motors have high inrush currents
<LI>Solenoids (anything with a coil!) have inductive kick backs.
<LI>Some loads look like large capacitors. From time to time we have someone use a solid state switch to directly control power to a device like a battery powered transistor radio. The problem here is that the radio will contain maybe 1000&micro;F across its battery terminals. That will look like a dead short when power is first applied.</UL></UL>In general, the electronics will last pretty much forever providing they are not subject to abuse like above. If environmental deterioration is eliminated, you are down to component lifetime. Perhaps the most vulnerable components here are electrolytic capacitors, because they can dry out. 

The most important factor in component failure is temperature. As a rule of thumb every 10'C rise in temperature will double the failure rate, i.e. probability of a component failure in a given time.

One other failure mechanism is wear-out of Flash memory components. In SPLat that means how many PermStore, ShadowWrite or NVEM writes your program does. The SPLat Knowledge Base describes the endurance for each controller product, for example the section "MS120: Non-volatile memory".

By the way, do not automatically assume that solid state is always better. Good old fashioned relays still have a place. In your case, SS will be best because at 100 operations a second a relay will wear out mechanically in weeks or months. However, in general a relay is much more tolerant of an occasional overload that would kill a solid state switch instantly. An example of this would be a jammed motor drawing 20x its normal running current. The relay could take it on the chin until the fuse blows, while a transistor provides perfect protection for the fuse! When we design solid state DC motor drives we include current sensing and through hardware, firmware or SPLatWare turn off the drive if it senses an overload.

I hope this helps.

David]]>
   </content>
</entry>
<entry>
   <title>Christmas arrangements 2008</title>
   <link rel="alternate" type="text/html" href="http://www.splatco.com/blogs/david/2008/12/christmas_arrangements_2008.html" />
   <id>tag:www.splatco.com,2008:/blogs/david//1.92</id>
   
   <published>2008-12-03T00:44:11Z</published>
   <updated>2008-12-03T00:59:54Z</updated>
   
   <summary>I am posting our Christmas arrangements a bit earlier this year. Our Boston office will be closed from now until December 22, while we all get together here in Melbourne for somewhat extended celebrations (and some serious work!). The Boston...</summary>
   <author>
      <name></name>
      
   </author>
         <category term="News" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://www.splatco.com/blogs/david/">
      I am posting our Christmas arrangements a bit earlier this year. Our Boston office will be closed from now until December 22, while we all get together here in Melbourne for somewhat extended celebrations (and some serious work!). The Boston office will again be closed December 25 through January 1.

Our Melbourne office closes December 19 through January 4, re-opening Monday January 5.

Between now and December 19 all orders will be shipped out of Melbourne. From the December 19 through January 4 there will be no order processing.
      
   </content>
</entry>
<entry>
   <title>Tech Support: 4-20mA input</title>
   <link rel="alternate" type="text/html" href="http://www.splatco.com/blogs/david/2008/03/tech_support_420ma_input.html" />
   <id>tag:www.splatco.com,2008:/blogs/david//1.91</id>
   
   <published>2008-03-18T22:33:22Z</published>
   <updated>2008-03-18T22:39:06Z</updated>
   
   <summary>Simon asks Hi David Please --- is there provision on the MMi202 Board of a voltage supply to run the 0-20 mA current loop. I have a PT100 transmitter/amplifier which will run from 10 to 30v and is powered by...</summary>
   <author>
      <name></name>
      
   </author>
         <category term="Tech support questions" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="82" label="4-20mA" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="84" label="current loop" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://www.splatco.com/blogs/david/">
      <![CDATA[Simon asks

<blockquote><strong>Hi David

Please --- is there provision on the MMi202 Board of a voltage supply to run the 0-20 mA current loop. I have a PT100 transmitter/amplifier which will run from 10 to 30v and is powered by the current loop itself and would like to be able to use this thing for temperature sensing for control. many thanks cheers</strong></blockquote>]]>
      <![CDATA[Simon, most 4-20 transmitters can be regarded at 2-wire devices. 
Simply connect it between +24 and the SPLat input.


 <pre>                           +24V
 --------o-----------------------------o-------------
         |                             |
         |                        .----|-----.
         |                        |     +    |
    .----|------.                 |          |
    |    V+     |                 |  4-20 Tx |
    |           |                 |          |
    |       Ain -------------------          |
    |           |                 |          |
    |           |                 '----------'
    |           |
    |  SPLat    |
    |           |
    |   0V      |
    '----|------'
         |
         |
   ------o------------------------------------------
created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de 
</pre>]]>
   </content>
</entry>
<entry>
   <title>Standard SPLat or Custom?</title>
   <link rel="alternate" type="text/html" href="http://www.splatco.com/blogs/david/2008/03/standard_splat_or_custom.html" />
   <id>tag:www.splatco.com,2008:/blogs/david//1.90</id>
   
   <published>2008-03-09T13:01:05Z</published>
   <updated>2008-03-09T14:37:07Z</updated>
   
   <summary>I was talking to a gentleman in Louisville KY yesterday, and he politely told me off because our website is not explicit enough about our custom controller offering. Not that I mind such critiques - how can we make our...</summary>
   <author>
      <name></name>
      
   </author>
         <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="185" label="Proof of Concept" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="183" label="custom" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://www.splatco.com/blogs/david/">
      I was talking to a gentleman in Louisville KY yesterday, and he politely told me off because our website is not explicit enough about our custom controller offering. Not that I mind such critiques - how can we make our message clearer unless people give us feedback? Anyhow, here&apos;s a shameless plug for our custom capability:

We do make custom controllers. In fact, we make many more custom boards than standard boards, because we have some major OEMs as customers and make some of their products in very significant numbers.
      <![CDATA[One thing most of those boards have in common, however, is that they are still SPLat controllers at the core. That means they are programmed using SPLat/PC, with MultiTrack and all that. In some cases we do the programming and in others the customer does it. Frequently we get the customer going with an initial program and they then take over ongoing enhancements themselves.

By making a custom controller around a SPLat core we gain a huge reduction in the initial engineering cost (NRE). We also reduce the project risk factor to virtually zero, because so much of the design is based on existing recipes. If a project does include some element of the unknown (say a unique sensing arrangement), we make sure that aspect is tackled first and fully resolved before expending effort om the main design. And naturally, a SPLat controller means easy programming because the language and tool set have been optimized for embedded controller applications.

The other advantage of making SPLat-based custom controls is that our customer can do his Proof of Concept prototypes using standard off-the shelf SPLat. When the custom design is done most of the original programming can be re-used, again saving money and reducing risk.

We have never had a design failure with SPLat. On those occasions where a redesign was required it was because the customer had not properly specified his needs to start with. It could probably be called a specification failure. Even that happens much less frequently than it might, because we are quite good at teasing out of our customers exactly what they need. The last redesign we did was because the customer belatedly realized he had 3 other products that could use the same controller if only it had a couple of extra features, something we could hardly have guessed at in the beginning. We are currently conducting research into the process of specifying controllers, both from the point of view of extracting information from customers and also how to formally represent a functional and software specification in a way that does not require a PhD to understand.

Sometimes we do make a non-SPLat custom controller. This will be either where it is an appliance control being made in very high volume at a rock bottom price, or where the performance (speed, memory size) requirements exceed what we can achieve with a SPLat. At the low end a SPLat may be too much performance (and cost), and a lean and mean custom design is justified. We can then use tiny 8 or 16 pin processor chips like small PICs. At the high end we can and do use much more powerful processors like 32-bit ARMs.

The custom SPLat approach comes into its own in one of two main scenarios:
<OL>
<LI>Where the quantity is fairly large (300-500 plus per year) there can be a significant saving in making something "down to size" (i.e. trimming off the fat).
<LI>Where a feature is required that is difficult or very expensive to provide in off the shelf product. In some cases we save the customer more than  the cost of the SPLat by eliminating external add-on gadgets like current limiters or sensor pre-amplifiers.
]]>
   </content>
</entry>
<entry>
   <title>New program management tool</title>
   <link rel="alternate" type="text/html" href="http://www.splatco.com/blogs/david/2008/03/new_program_management_tool.html" />
   <id>tag:www.splatco.com,2008:/blogs/david//1.89</id>
   
   <published>2008-03-09T12:04:09Z</published>
   <updated>2008-03-09T12:21:28Z</updated>
   
   <summary>We have just released a new project management tool called Builder. In brief Builder makes it convenient to break large SPLat programming projects up into a number of individual modules. These modules can contain their own test code, so they...</summary>
   <author>
      <name></name>
      
   </author>
         <category term="Programming" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="179" label="Builder" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="177" label="SPLat/PC" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="181" label="modular programming" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://www.splatco.com/blogs/david/">
      <![CDATA[We have just released a new project management tool called Builder. In brief Builder makes it convenient to break large SPLat programming projects up into a number of individual modules. These modules can contain their own test code, so they can be tested independently of other modules in the project. Builder then allows you to "glue" together all your individual modules, leaving out the test code and arranging the various segments of the modules into the correct order. For example, it will make sure all the NVEM0 stuff is at the end and all mEQU directives are at the beginning, before any defBYTE (etc).

In short, builder helps you to work in a more systematic and structured way on large projects.

Builder is part of latest SPLat/PC, just released <a target="_blank" href="http://splatco.com/splat_pc_upgrade_siden.htm">here</a>.

<a target="_blank" href="http://splatco.com/skb/4375.htm">Builder documentation</a>

<img alt="builder1.gif" src="http://www.splatco.com/blogs/david/builder1.gif" width="450" height="293" />]]>
      
   </content>
</entry>
<entry>
   <title>Upgraded CC has analog</title>
   <link rel="alternate" type="text/html" href="http://www.splatco.com/blogs/david/2008/03/upgraded_cc_has_analog.html" />
   <id>tag:www.splatco.com,2008:/blogs/david//1.88</id>
   
   <published>2008-03-09T11:49:31Z</published>
   <updated>2008-03-09T11:58:57Z</updated>
   
   <summary>In the 15 months since its release the CC16 has become very popular. We have now upgraded the design and included a couple of new features, namely two analog inputs and a bi-color status LED. The new model is called...</summary>
   <author>
      <name></name>
      
   </author>
         <category term="News" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="4" label="CC16" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="173" label="CC18" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="175" label="LED" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="85" label="analog" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://www.splatco.com/blogs/david/">
      <![CDATA[In the 15 months since its release the CC16 has become very popular. We have now upgraded the design and included a couple of new features, namely two analog inputs and a bi-color status LED. The new model is called CC18.

The analog inputs are very well suited to the new breed of sensors that produce a ratiometric output voltage between 0V and the + supply (normally 5V).

The LED is a red/green LED that can be set to light steady of blink in red, green or orange. 

Everything else is exactly what you have become used to, only the 5V regulator is now flat to the board, reducing the overall hight.

<a target="_blank" href="http://www.splatco.com/cc16p1.htm">More on the CC18</a>]]>
      
   </content>
</entry>
<entry>
   <title>Tech Support: Motor speed</title>
   <link rel="alternate" type="text/html" href="http://www.splatco.com/blogs/david/2008/03/tech_support_motor_speed.html" />
   <id>tag:www.splatco.com,2008:/blogs/david//1.87</id>
   
   <published>2008-03-01T01:19:18Z</published>
   <updated>2008-03-01T01:24:42Z</updated>
   
   <summary>Karl queried: I&apos;m working on a project where I need to control a motor, based on the feedback from an quadrature encoder. I&apos;m trying to do on the fly speed calculations of the encoder but can&apos;t get my head around...</summary>
   <author>
      <name></name>
      
   </author>
         <category term="Tech support questions" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="109" label="counting" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="171" label="frequency" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="170" label="motor speed" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="107" label="quadrature" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="168" label="rpm" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="167" label="tachometer" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://www.splatco.com/blogs/david/">
      <![CDATA[Karl queried:

<blockquote><strong>I'm working on a project where I need to control a motor, based on the feedback from an quadrature encoder.

I'm trying to do on the fly speed calculations of the encoder but can't get my head around how to do speed calculations as I need to know the time constant between pulse readings.

Any suggestions ?</strong></blockquote>]]>
      A quadrature encoder is intended to determining distance and direction rather than speed. For speed use a regular counting input (OBCA or OBCB depending on frequency) and read the number of pulses on A or B over 100mS or 1S. 

Corollary: For speed (only) you only need a simple single channel incremental encoder (or tacho encoder), though I think that these days most incremental encoders do have quadrature outputs.
   </content>
</entry>
<entry>
   <title>Tech Support: Reading back a program</title>
   <link rel="alternate" type="text/html" href="http://www.splatco.com/blogs/david/2008/01/tech_support_reading_back_a_pr.html" />
   <id>tag:www.splatco.com,2008:/blogs/david//1.86</id>
   
   <published>2008-01-13T10:51:44Z</published>
   <updated>2008-01-13T10:57:06Z</updated>
   
   <summary>Don wondered: Howdy, bought a controller off you last week and I was wondering how do you read the program back off the board? I have worked through the online tutorial (love it) and I couldn&apos;t remember what the last...</summary>
   <author>
      <name></name>
      
   </author>
         <category term="Tech support questions" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="165" label="Security" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="166" label="upload" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://www.splatco.com/blogs/david/">
      <![CDATA[Don wondered:

<blockquote><strong>Howdy, bought a controller off you last week and I was wondering how do you read the program back off the board? I have worked through the online tutorial (love it) and I couldn't remember what the last program I transferred was, and I couldn't find any reference to it in the SKB.</strong></blockquote>]]>
      <![CDATA[Don, the simple answer is that <i>you cannot read back a program out of a SPLat controller.</i> That is a very significant feature of SPLat, as it ensures that your hard work is protected from any unscrupulous competitor who may want to rip off you program.]]>
   </content>
</entry>
<entry>
   <title>Tech Support: Divide and Conquer</title>
   <link rel="alternate" type="text/html" href="http://www.splatco.com/blogs/david/2008/01/tech_support_divide_and_conque.html" />
   <id>tag:www.splatco.com,2008:/blogs/david//1.85</id>
   
   <published>2008-01-04T06:59:07Z</published>
   <updated>2008-01-04T07:21:15Z</updated>
   
   <summary>Here&apos;s an example of how a tricky problem can be solved by breaking it down into smaller pieces, in this case by using a separate MultiTrack task. Rab has a MultiTrack program where any one of several independent tasks may...</summary>
   <author>
      <name></name>
      
   </author>
         <category term="Tech support questions" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="27" label="MultiTrack" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="18" label="multitasking" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="129" label="objects" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="122" label="resource sharing" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="13" label="semaphores" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://www.splatco.com/blogs/david/">
      <![CDATA[<strong>Here's an example of how a tricky problem can be solved by breaking it down into smaller pieces, in this case by using a separate MultiTrack task.
<br>
<br>
Rab has a MultiTrack program where any one of several independent tasks may generate an alarm The alarm results in a siren sounding. What Rab wants is for the alarm to have a Clear button, and when the button is pressed the siren will be muted for 20 minutes. How can this be programmed?</strong>
<BR><BR>]]>
      <![CDATA[Providing it's OK for the siren to always remain on until manually cleared, the function can be implemented very simply with a separate task to control the siren. This siren task gets sent alarm requests by other tasks. Here's the code. It should be simple enough for anyone with FastTrack plus MultiTrack exposure to analyze.
<Br><BR>
<pre>
;===== Siren manager ==========<br><br>;A GoSub SIR_Alarm will start the siren on output oSIR_en.<br>;The siren will run until the clear button iSIR_Clear is pressed.<br>;Thereafter it will ignore any further requests (GoSub SIR_Alarm)<br>;for 20 minutes.<br><br>;Uses a semaphore and one MultiTrack task. <br><br>;Do a GoSub SIR_Init at the start of your program to initialise.<br><br>oSIR_en         oEQU    8       ;(say)<br>iSIR_Clear      iEQU    9       ;(say)<br><br>sSIR_Request    defSEM<br><br>SIR_Init:<br>                ClrS            sSIR_Request<br>                LaunchTask      SIR_Task<br>                Return<br><br>SIR_Alarm:<br>                SetS            sSIR_Request<br>                Return<br><br>SIR_Task:<br>                WaitForST       sSIR_Request<br>                On              oSIR_en<br>                WaitForInK      iSIR_Clear<br>                Off             oSIR_en<br>                Pause           120000          ;20 minutes<br>                ClrS            sSIR_Request<br>                GoTo            SIR_Task<br>
</pre>
<BR><BR>
This example also illustrates using a semaphore to communicate between MultiTrack tasks, as well as using GoSubs (subroutines) to "hide" the internal workings of the siren function.]]>
   </content>
</entry>
<entry>
   <title>Moving mountains</title>
   <link rel="alternate" type="text/html" href="http://www.splatco.com/blogs/david/2007/12/moving_mountains.html" />
   <id>tag:www.splatco.com,2007:/blogs/david//1.84</id>
   
   <published>2007-12-19T10:47:08Z</published>
   <updated>2007-12-19T11:24:33Z</updated>
   
   <summary>I want to tell you about a friend of mine, a very special gentleman. Remco van Santen is a retired economist cum chemist. Rem has been quite a traveler in his time, and has back packed his way around South...</summary>
   <author>
      <name></name>
      
   </author>
         <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://www.splatco.com/blogs/david/">
      <![CDATA[I want to tell you about a friend of mine, a very special gentleman. Remco van Santen is a retired economist cum chemist. Rem has been quite a traveler in his time, and has back packed his way around South America, the back woods of China and India.

In his travels in India Rem discovered a small hill town called Nainital. This is a beautifully situated town that in recent years has become dirty and ugly with pollution and neglect. It contains some wonderful examples of British colonial architecture that is sadly decayed, and its once-beautiful lake is dead or dying from oxygen depletion.
<img alt="nainital_poster.jpg" src="http://www.splatco.com/blogs/david/nainital_poster.jpg" width="500" height="324" />
Rem fell in love with the town and decided to do something about it. When he told me what he had in mind I thought he had lost his marbles thinking he could move the mountains of entrenched indifference and sectional self-interest. 

I am delighted to tell you I was wrong.
]]>
      <![CDATA[
Rem launched the Nainital Development Trust. Using his own money he traveled to Nainital, booked into a flea pit hotel and started badgering, pestering, shaming, recruiting, cajoling and generally making a nuisance of himself. He received promises of support from local dignitaries, exposure in local and national newspapers and endorsements from politicians. But all of this was overshadowed by people positioning themselves to gain maximum personal kudos and put one over on their rivals.

Rem was down but not out. He returned to Australia, recharged and regrouped, took his partner Di Wilson and returned to Nainital. He succeeded in pushing through a plan for a Clean Up Nainital Day. Local school children were encouraged to join in with a poster competition (winning entry shown above). The day was an outstanding success and the movement to clean up the town is gathering  momentum. Nainital is now set on a course to clean itself up and perhaps once more become a prosperous tourist destination.

One person can make a difference if determined enough. Remco has now widened his horizon and is taking on more towns in India.

You can learn more on the website Rem runs, <a target="_blank" href="http://www.mynainital.com">www.mynainital.com</a>. In his other life Rem operates a major portal website for the chemical industry. The income he earns from Google advertising on <a target="_blank" href="http://www.chemlink.com.au">www.chemlink.com.au</a> helps fund the Good Works in India (turn off your ad blocker before going there, so you can support his advertisers!)]]>
   </content>
</entry>
<entry>
   <title>A Christmas tale</title>
   <link rel="alternate" type="text/html" href="http://www.splatco.com/blogs/david/2007/12/a_christmas_tale.html" />
   <id>tag:www.splatco.com,2007:/blogs/david//1.83</id>
   
   <published>2007-12-19T10:26:33Z</published>
   <updated>2007-12-19T11:31:05Z</updated>
   
   <summary>Christmas is a time to think of others. Here&apos;s a real story of the Christmas spirit.</summary>
   <author>
      <name></name>
      
   </author>
         <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://www.splatco.com/blogs/david/">
      <![CDATA[<img src="http://splatco.com/assets/graphics/splanta100wide.gif" width="100" height="89" border="0" alt="" hspace="5" align="right"><strong>Well, folks, Christmas is looming once more. To me Christmas is about people and caring, so I thought I'd cheer up your season with a tale of real caring. These are true stories, with only the names changed.</strong>

<strong><u>A very dark cloud ...</u></strong>

A young family of my acquaintance struck some very bad luck at Easter. Jack, the husband, suffered a serious stroke. The family, Jack and Jill and children Mary (5) and Peter (4) were already in trouble, due to a business that had turned sour. They had lost their very nice home, a city warehouse apartment, and were scratching for income. Jack, a former policeman, had taken a sales job that he really hated, and was just getting up to speed with sales and commissions when disaster struck him down.
]]>
      <![CDATA[Fast forward to today. The young family are living in Jill's mother's and step father's small house, which has been hastily converted to accommodate a young family. Jack has been in hospital and rehabilitation for 6 months, but has now been sent "home". He requires 24/7 care. He is able to walk a few feet at a time, just, with the help of a 4-pronged walking stick and a guide. He cannot shower himself or go to the lavatory without assistance. His attention span is 60 seconds, tops. Basically he is wheelchair-bound and looks most unlikely to ever work again.

<strong><u>...with a silver lining</u></strong>

During the whole time there have been many examples of support and kindness, from friends helping transport and store household belongings against the day the family have their own home again, to the local ballet school who gave Mary a lifetime scholarship. But those are not what I want to describe.

<strong><u>Caring ex colleagues.</u></strong>

Jack retired from the police force about 8 years ago. However, his former colleagues have not forgotten him (he worked in a very elite branch where they literally put their lives in danger all the time). When Jack had his stroke, the members of his former branch banded together and pledged a weekly donation to be taken directly out of their pay packets. Something like $200/week total. But there's more: Last week Jack received a Christmas card from his mates, and inside was a cheque for $750 towards his wheelchair.

<strong><u>A random act of kindness.</u></strong>

When Jill went to pick up Mary from school the other day, one of the other mums approached her and handed her an envelope. It was from a third woman who had heard about the family's plight. <em>Someone Mary has never met</em>. Inside the envelope was a Christmas card and a $1000 gift voucher for a major department store. One thousand dollars given by a total stranger to another total stranger!

Restores your faith in Humanity, doesn't it?

So here is my Christmas message: Let this be a time when we all give some thought to those less fortunate than ourselves. However tough your life may be, there is someone else who is doing it tougher. Is there someone you know who will be all alone at Christmas? Invite them into your home for Christmas dinner. Or maybe you could <a target="_blank" href="http://www.planusa.org/">sponsor a child in India or Africa</a>. Is there perhaps something you could do for the <a target="_blank" href="http://splatco.com/david/us_feb04/index.htm">homeless people freezing on the streets of cities like Chicago</a>?

<em>Let your Christmas present to Mankind be a random act of kindness.</em>

Post script: Mary is now 6. She had her year-end ballet concert last Saturday. She performed like a star!

Stop press: Literally as I was writing the above (this is totally true) Jack and Jill received a visit from an ex colleague in the sales job he hated. His sales ex-work-mates had all banded together and collected $750 - towards his wheel chair.
]]>
   </content>
</entry>
<entry>
   <title>Tech Support: Resource sharing</title>
   <link rel="alternate" type="text/html" href="http://www.splatco.com/blogs/david/2007/12/tech_support_resource_sharing.html" />
   <id>tag:www.splatco.com,2007:/blogs/david//1.82</id>
   
   <published>2007-12-14T22:42:34Z</published>
   <updated>2007-12-14T23:59:43Z</updated>
   
   <summary>Rab asked: In a Multi Tracking program with 4 Tasks and each task has the ability to turn on a (common) siren if in a trouble situation. How can I disable the siren output for a period (say 20 min)...</summary>
   <author>
      <name></name>
      
   </author>
         <category term="Tech support questions" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="162" label="alarms" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="122" label="resource sharing" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="13" label="semaphores" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="164" label="shared resources" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://www.splatco.com/blogs/david/">
      <![CDATA[Rab asked:
<blockquote><strong>In a Multi Tracking program with 4 Tasks and each task has the ability to turn on a (common) siren if in a trouble situation.

How can I disable the siren output for a period (say 20 min) from a input and have the siren reset and be ready to operate again after the 20 minute period?</strong></blockquote>]]>
      <![CDATA[Rab,

The problem here is that you have allowed 4 different tasks to "own" the siren, so control of the siren resource has become diffuse and hard to manage.

Try making a separate task to control the siren. It receives requests from it's "clients" (the 4 existing tasks) when they want an alert. The requests can be in the form of semaphores. The siren task then looks at the requests plus the inhibit input and decides what to do.

By doing this you will have separated the two aspects of the problem:
<ol start="1"><LI>Deciding that an alarm condition exists, and</li><li>Sounding or muting the siren</li></ol>from each other. This should make it easier to make the program do exactly what you want it to do. It will also make maintenance easier, so if you want to change the "rules" for sound or silence there will be no impact on how and when alarm conditions are generated.]]>
   </content>
</entry>
<entry>
   <title>Tech Support: Several outputs at once</title>
   <link rel="alternate" type="text/html" href="http://www.splatco.com/blogs/david/2007/12/tech_support_several_outputs_a.html" />
   <id>tag:www.splatco.com,2007:/blogs/david//1.81</id>
   
   <published>2007-12-11T08:30:47Z</published>
   <updated>2007-12-11T08:42:32Z</updated>
   
   <summary>Neil&apos;s problem: I will have no difficulty learning to use program however I need to use as many as five outputs on one line. I can not find the method in the tutorial. Great program...</summary>
   <author>
      <name></name>
      
   </author>
         <category term="Tech support questions" scheme="http://www.sixapart.com/ns/types#category" />
   
   <category term="158" label="OutputM" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="161" label="binary count" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="159" label="outputs" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://www.splatco.com/blogs/david/">
      <![CDATA[Neil's problem:

<blockquote><strong>I will have no difficulty learning to use program however I need to use as many as five outputs on one line. I can not find the method in the tutorial.

 Great program</strong></blockquote>]]>
      <![CDATA[Hi Neil, the instruction you need is probably <a target="_blank" href="http://splatco.com/skb/2182.htm">OutputM</a>. This will update up to 8 contiguous outputs simultaneously. For example, the following program will produce a 5-bit binary count sequence in outputs 9 through 13

<pre>
Loop:    IncX               ;Inc counter
         Push               ;Make a copy
         LoadX      %11111  ;Select bits to be output
         OutputM    9       ;Send to o/p 9 ...
         Pause      50      ;delay
         GoTo       Loop    ;repeat
</pre>]]>
   </content>
</entry>

</feed>
