<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>ICS on Spaghetti Code with Beer</title><link>https://nagimov.me/tags/ics/</link><description>Recent content in ICS on Spaghetti Code with Beer</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><lastBuildDate>Thu, 03 Oct 2019 19:41:14 -0700</lastBuildDate><atom:link href="https://nagimov.me/tags/ics/index.xml" rel="self" type="application/rss+xml"/><item><title>The Horror of PLC Programming</title><link>https://nagimov.me/post/the-horror-of-plc-programming/</link><pubDate>Thu, 03 Oct 2019 19:41:14 -0700</pubDate><guid>https://nagimov.me/post/the-horror-of-plc-programming/</guid><description>Consider this simple code snippet&amp;hellip;
10 VALVE1_POS = S405_VH(1400) 20 VALVE2_POS = 80.0 30 IF VALVE1_POS &amp;gt; 50.0 THEN VALVE3_POS = 99.5 ELSE VALVE3_POS = 0.5 &amp;hellip;and let me follow your observations:
you notice a weird line enumeration, just like in good old BASIC, you see three variables, VALVE1_POS, VALVE2_POS and VALVE3_POS, you find S405_VH(1400) most likely to be a function call retrieving a position of the valve 1, position of the valve 2 is set to 80.</description></item></channel></rss>