Category Archives: Articles

PLC Fiddle – Online Editor and Simulator in your Browser

I have recently come across a free virtual plc simulator called PLC Fiddle. It will enable you to create simple PLC ladder logic code within your browser. This is an ideal way in understanding PLC concepts for industrial automation. All of the basic PLC instructions that come with most plc units have been incorporated in this virtual PLC software.
PLC Fiddle is currently in an early stage of development but is functional enough to be helpful to you in learning and understanding PLC concepts. We will be reviewing this software and creating a few common basic circuits. Using the simulator we will test our circuits and monitor our PLC programs (circuits). Let’s get started. Continue Reading!

Implementing the Solo Process Temperature Controller

The SOLO Temperature Controller is a single loop dual output process temperature controller that can control both heating and cooling simultaneously. It is available in 1/32, 1/16, 1/8 and 1/4 DIN panel sizes and is UL, CUL and CE approved. The name of temperature controller is deceiving. This unit will also accept voltage and current into them, which is great for process control.

Recently I was asked: How you can change the pressure value from PSI to Bar?

They were bringing into the controller a voltage signal. This can be scaled using the tP-H (High level signal) and tP-L (Low level signal). The units on the display scaled for you. The default is -999 to 999. See section 11-2 of the following information guide that comes with the controller. Continue Reading!

Creating a Database in SQL Server Express 2014

Microsoft SQL Server Express 2014 is a free, edition of SQL Server this is ideal for learning and developing desktop, web and small server applications. The database size can be 10 gigabytes in size. SQL Server Express 2014 release includes the full version of SQL Server 2014 Management Studio. We will be using SQL Server 2014 Management Studio (SSMS) to create a database. The SQL Server database will be created so we can connect to it for data acquisition (data logging) from our PLC applications. Continue Reading!

Installing SQL Server Express 2014

Microsoft SQL Server Express 2014 is a free, edition of SQL Server this is ideal for learning and developing desktop, web and small server applications. The database size can be 10 gigabytes in size. SQL Server Express 2014 release includes the full version of SQL Server 2014 Management Studio. This is a method to read, write and maintain our database. (Tools) We will be installing this SQL Server database so we can connect to it for data acquisition (data logging) from our PLC applications.

Installing the software
The download file can be obtained from the website for SQL Express 2014.
https://www.microsoft.com/en-ca/download/details.aspx?id=42299
We will be installing the ExpressAdv 64Bit\SQLEXPRADV_x64_ENU.exe on a windows 7 64 bit machine.
This is the latest software that can be installed on the Windows 7 operating system. Continue Reading!

What Everybody Ought to Know About IP Addressing

Communication using Ethernet usually evolves around the Open Systems Interconnection model (OSI model). This model was made for computing systems to communicate without regard for the underlying internal structure and technology.

Think of it like sending a letter:
You write the message on paper – This is like the protocol that the system will be using. The protocol is like the language that the two devices will be communicating.
IP Addressing 001-min
Sign it at the bottom of the paper – This signature is like a MAC address for the system. It will uniquely identify you.
IP Addressing 002-min
Put it into an envelope and address it (Also return address) – This address is like the IP address for the system. It lets everyone know the location that the letter is going and returning.
IP Addressing 003-min
Stamp, and put it in the mail – This is like the physical cable that we will be using. The schedule pickup, sorting, routing etc. to get you letter to the sender is now out of your hands.
This is similar to the OSI model. The layers within the model will communicate with each other to ensure that the information will get to the designation without error.

IP Address:
An IP (Internet Protocol) Address is a user defined numeric label assigned to a device on an Ethernet network that identifies the network and node. An IP address is a 32 bit address that is normally grouped into 4 bytes for ease of communication and understanding. Example: 192.168.1.1
You can look up your current address by going to the following url:
http://whatismyipaddress.com/

MAC Address:
The MAC (Media Access Control) Address is also called the physical address. This is part of the unique identification on an Ethernet network. The MAC address is a 48 bit address that is normally grouped into 6 bytes for ease of communication and understanding. Example: 00:02:A1:BC:72:33
Here is a URL link to find your MAC address on your computer:
http://www.wikihow.com/Find-the-MAC-Address-of-Your-Computer
Devices use their hardware addresses to communicate with each other within the OSI model.

Ethernet networks support many different types of protocols, including TCP/IP. In the industrial environment you will often here of EtherNet/IP , Modbus TCP, Profinet etc. are all part of TCP/IP.

There are a defined number of IP addresses that have been defined as private IP addresses. These addresses are not allocated to any specific organization and anyone can use these without approval. Choose the one with the range that will fit your application.

Class Private IP Addresses
A 10.0.0.0 – 10.255.255.255
B 172.16.0.0 – 172.31.255.255
C 192.168.0.0 – 192.168.255.255

Subnet Mask:
A subnet mask is an address that enables distinction between networks. It is used to divide the network into smaller units called Subnets. This is beneficial when the office communications are separate from the plant floor communications. It adds level of security and enhances maintenance and upgrade options.
A subnet mask is a 32 bit address that is normally grouped into 4 bytes. This is the same as the IP address, because we compare the IP addresses with the subnet mask to determine if they can communicate directly with one another. If not then the communication must happen through a router to get to the destination. The subnet mask must match for communications to happen.

Example:
Compare the following Modbus TCP addresses and see if they are on the same subnet:
Modbus TCP Address 1: 192.168.1.3
Modbus TCP Address 2: 192.168.0.10
Subnet Mask: 255.255.255.0
IP Addressing 070-min
Convert these decimal values to their binary equivalent:
(You can do this by using your windows calculator in programmer mode. View | Programmer or Alt + 3)
IP Addressing 015-min
Modbus TCP Address 1:
11000000.10101000.00000001.00000011
Modbus TCP Address 2:
11000000.10101000.00000000.00001010
Subnet Mask:
11111111.11111111.11111111.00000000
Same Subnet Compare:
11111111.11111111.1111111x.00000000
If the subnet mask has a ‘1’ then compare the two addresses and see if they are similar. In our example there is a difference, so the two devices will not communicate. You must change the subnet mask on the entire system or IP address.
IP Addressing 080-min
Let’s now change the IP address on Address 2.
Modbus TCP Address 1: 192.168.1.3
Modbus TCP Address 2: 192.168.1.10
Subnet Mask: 255.255.255.0
IP Addressing 090-min
Convert these decimal values to their binary equivalent:
Modbus TCP Address 1:
11000000.10101000.00000001.00000011
Modbus TCP Address 2:
11000000.10101000.00000001.00001010
Subnet Mask:
11111111.11111111.11111111.00000000
Same Subnet Compare:
11111111.11111111.11111111.00000000
We can now communicate successfully.
IP Addressing 100-min

Troubleshooting your Ethernet network is easy by using a free product called Wireshark. https://www.wireshark.org/
This software will monitor and display your Ethernet traffic. Highlighting different communication protocols, you can quickly see your communication in action. Introduction to Wireshark Video gives a good overview of what is possible and shows what to look for on your network.
IP Addressing 110-min

IP Address selection on your network must be unique. You cannot have two addresses the same. As a general rule only those addresses within the same subnet will communicate to each other without the need for a router.

Watch on YouTube : What Everybody Ought to Know About IP Addressing
If you have any questions or need further information please contact me.
Thank you,
Garry



If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.

To get this free article, subscribe to my free email newsletter.


Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.

Deploying an AdvancedHMI Project

Deploying an AdvancedHMI project on the industrial floor sounds like an easy task, but there are a few things that you should consider. The HMI (Human Machine Interface) user interface will run on a computer. The industrial environment is one in which temperature, dust, electrical noise, etc. are always present. This can also be combined with workers wanting to play with the new computer. We will look briefly at the hardware and software items that will make your install more reliable and user friendly in the field.
cloud-37011_640-min

Hardware
The hardware that you deploy in the field should match the environment that you expect it to work in. Computers come in many shapes, sizes and price points. Here are a few items that you may want to consider.
thermometer-934646_640-min

  • Fanless Computer – This will keep the dust out but temperature may be a problem.
  • Monitor – Location and type – Do you need touch screen?
    Keyboard and mouse – Washable?
  • Enclosures – If you are in a wash down environment then an enclosure is a necessity. Sometimes these enclosures are worth more than the contents in them.
  • UPS – The uninterruptable power supply will usually serve two purposes. It will act when power is removed so the computer will be able to shutdown correctly. The UPS will usually also act as a power conditioner. Most power has surges on the line and this can be amplified when in the industrial environment. The surge suppressors in the UPS will protect the computer.
  • Program backup – Have multiple copies of the software saved in different places. You never know when the unexpected will happen. (Fire / Thief etc.) This includes the backup disks for your operating system as well as the programs (versions) that you are running on the computer. (AdvancedHMI, Visual Studio)
  • Documentation of the backup (Hardware / Software) – Ensure that you have documentation of the hardware and software versions that you are using. I would also include where everything was purchased. This way if records are missing we can track this down through the supplier.

Software
The software that we have on the production floor should be robust. This means that we should know what happens if thing go wrong. Backups as mentioned above should happen on a regular basis. Memory is inexpensive so backup your files regularly. We usually use a networked computer to automatically back up the production files each day. The following is a list of items that you should pay attention to when deploying a computer on the production environment.

  • Turn off windows update – Windows is great at keeping itself up to date. However this can cause programs to stop working. When dealing with an AdvancedHMI deployment we set windows to ‘Download updates but let me choose whether to install them’. It can take several minutes for windows to update. You want to be sure that the machine being controlled will not be affected.
    AdvancedHMI Deployment 010-min
  • Security – Set permissions – When setting up your windows computer for the factory floor, do not give the account that boots up and logs on automatically Administrator Privileges. It should be set up as a Standard User. This will prevent unauthorized software being loaded onto the system.
    Internet Explorer comes standard on any new computer with windows 8.1 or older. No other browser is present out of the box. It is good to set a supervisor password on the internet connection. This will allow you to restrict the internet use.
    http://www.thewindowsclub.com/password-protect-the-use-of-internet-explorer
    On the run prompt type: RunDll32.exe msrating.dll,RatingSetupUI
    Goto the General tab to select a supervisor password
    AdvancedHMI Deployment 020-min AdvancedHMI Deployment 025-min
  • AdvancedHMI – There are a few thing that we can do in the AdvancedHMI project. We will look at the AdvancedHMI project that we did for Creating a HMI Login Screen on AdvancedHMI.
    AdvancedHMI Deployment 060-min
    o ControlBox – Remove the ControlBox on the main screen form. This will ensure that the user cannot minimize, maximize or close the application.
    AdvancedHMI Deployment 030-min
    o Maximize for screen size – Make the main screen form maximized so it will fill the entire screen.
    AdvancedHMI Deployment 040-min
    o Form.TopMost = True – This command will ensure that your application will be on top of all other windows forms.
    AdvancedHMI Deployment 050-min
    In this example the calculator has focus, but the our windows form will always be on top.
    AdvancedHMI Deployment 055-min
    If you have only one form then you can use the Properties settings for the form you always want on top. Multiple pages will have to include some additional programming to ensure that they are on top and visible.
    Here is the code for the returning to the main form of the program.
Private Sub ReturnToMainButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
    Me.TopMost = False
   MainForm.Show()
    MainForm.TopMost = True
    Me.Hide()
End Sub
  • Shortcut on the desktop – Place a shortcut to the AdvancedHMI application on the desktop. This will allow someone to quickly start the application if the application unexpectedly closes.

Following the above recommendations will ensure that your computer will perform and last as expected on the factory floor. Your AdvancedHMI project will work reliable and efficiently.

If you would like a copy of the PLC and AdvancedHMI programs, please contact me and I would be happy to send them to you.

Watch on YouTube : Deploying an AdvancedHMI Project
If you have any questions or need further information please contact me.
Thank you,
Garry

Archie Jacobs from Manufacturing Automation, LLC  has another tip for disabling the windows error recovery on startup.
On the PC that will run AdvancedHMI, click the start button and type CMD to find the Command Prompt. Right Click on the command prompt and select Run As Administrator
Once the Command Prompt opens, type the following:
bcdedit /set {current} bootstatuspolicy ignoreallfailures
This will prevent problematic startup when the PC is not shut down properly as often happens in the industrial environment.




If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.

To get this free article, subscribe to my free email newsletter.


Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.

Modbus TCP Data Logging to Database

Using Visual Basic 2015 we will log three holding registers from the PLC along with time and date into a Microsoft Access Database. We will log every minute into the database with the information that we collect from the PLC via Modbus TCP (Ethernet). All code will be done and shown so you can implement this in your application with different parameters. The information collected in the database can then be distributed or analyzed in the future.ModbusTCP MSAccess 010-min

Visual Basic 2015 will be used with the EasyModbusTCP client/server library for .net. We will communicate to an Automation Direct – Do-More PLC. Using the free simulation software of the PLC Designer Software, we will retrieve three values of the Modbus Holding Registers using Modbus TCP. Once we have this information out of the programmable logic controller it will be placed in a Microsoft Access (2010) Database. This will be done by using a SQL command to insert the data.

Automation Direct has a powerful simulator with their Do-More PLC. The PLC software is available from Automation Direct as a free download.
http://support.automationdirect.com/products/domore.html

ModbusTCP MSAccess 040-min

We will start with the PLC program. The first  three holding registers will be used. That will be MHR1, MHR2 and MHR3 in the Do-More PLC. This will correspond to register numbers 40001, 40002 and 40003. The following is a table with all of the references for Modbus communications to the Do-More.

Coil/Register Numbers Data Addresses Type Do-More PLC Table Name
00001-09999 0000 to 270E Read-Write MC1 to MC1023 Discrete Output Coils
10001-19999 0000 to 270E Read-Only MI1 to MI1023 Discrete Input Contacts
30001-39999 0000 to 270E Read-Only MIR1 to MIR2047 Analog Input Registers
40001-49999 0000 to 270E Read-Write MHR1 to MHR2047 Analog Output Holding Registers

Note: The Do More PLC uses the Modbus area to communicate. This is because having direct access to the digital I/O can be dangerous when connected via Ethernet to the internet. Data must move in and out of this area via the PLC program.

Here is the PLC program that sets the three registers.
ModbusTCP MSAccess 050-min

The next thing to do is set up our Microsoft Access 2010 Database. Our database will be named ACC_Database and it will be located at the following location: “C:\AccLog”. We will have one table called ACC_Log. In the table we will have five fields; LogDate, LogTime, Register1, Register2, Register3.

ModbusTCP MSAccess 090-min
ModbusTCP MSAccess 100-min

Visual Basic 2015 is free and is part of Visual Studio 2015. It can be downloaded at the following location:
https://www.visualstudio.com/en-us/products/visual-studio-community-vs

ModbusTCP MSAccess 020-min

EasyModbusTCP is free software. It will be referenced in our visual basic program.  It can be downloaded from the following location:
https://sourceforge.net/projects/easymodbustcp/
After downloading you must extract the files.

ModbusTCP MSAccess 030-min

EasyModbusTCP is a Modbus TCP, Modbus UDP client/server library for .NET and Client library for JAVA. .NET (.dll) Client/Server also supports Modbus RTU. It supports the following function codes: – Read Coils (FC1)
– Read Discrete Inputs (FC2)
– Read Holding Registers (FC3)
– Read Input Registers (FC4)
– Write Single Coil (FC5)
– Write Single Register (FC6)
– Write Multiple Coils (FC15)
– Write Multiple Registers (FC16)
– Read/Write Multiple Registers (FC23)

Now we will call up visual studio and create our project. The first thing that we must do is reference our EasyModbus.dll file.
ModbusTCP MSAccess 110-min
ModbusTCP MSAccess 120-min

Our program will log the three registers based upon a timer function. When the time expires we will set the interval to 1 minute and call a subroutine (Button1). This subroutine will communicate to the PLC via Modbus TCP and get our three registers. It will then insert the data from the registers along with the time and date into an access database.

Here is what our visual basic form will look like:
ModbusTCP MSAccess 060-min

Here is the visual basic code for our project. We use the Imports command for the EasyModbusTCP namespacing.

Imports EasyModbus 'Import the EasyModbus 

Here is the part of the subroutine that will communicate to the PLC via the EasyModbusTCP, You will notice that we have used the ‘Try’ command on the ModbusClient.Connect() statement. This way we can track if we are communicating or not to the PLC.

Public Class Form1
  Private Sub Button1_Click() Handles Button1.Click
 'This subroutine will communicate using the EasyModbusTCP to the PLC
 'This will execute when the user clicks the button or at specific intervals from the Timer1
 Dim ComError = 0 'Set communication error flag to 0
 'Specify the IP Address and Port Number that we are connecting
 Dim ModbusClient As EasyModbus.ModbusClient = New EasyModbus.ModbusClient(TextBox1.Text, 502)
 Try
 ModbusClient.Connect() 'Connect to the PLC
 Catch ex As Exception 'What to do when an error occurs
 Label10.ForeColor = Color.Red
 Label10.Text = "Communication Error!"
 ComError = 1 'Set communication error flag to 1
 End Try
 If ComError = 0 Then 'Do the following when communication is OK
 Label10.ForeColor = Color.Black
 Label10.Text = "Logging..."
 Dim Registers As Integer() 'Where to store the information
 Registers = ModbusClient.ReadHoldingRegisters(0, 3) 'Read three registers starting at the first one
 Label1.Text = Registers(0) 'Value of MHR1
 Label2.Text = Registers(1) 'Value of MHR2
 Label3.Text = Registers(2) 'Value of MHR3
 ModbusClient.Disconnect() 'Disconnect from the PLC

Here is the code to open the database connection and insert the data into our ACC_Database file. We use the ‘Try’ command to ensure that if errors occur it will not stop our program. The connection string ( Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\AccLog\ACC_Database.accdb) may be different then yours. In order to get your connection string, please review the following from a previous post and search for connection string.

'Log values into an Access Database
 'We will use a SQL instruction to insert a record into the table
 Try
 Dim SQL As String 'SQL Command String
 Dim objCmd As New OleDb.OleDbCommand 'Command
 'Connection String to the Access Database
 Dim Con = New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\AccLog\ACC_Database.accdb")
 'SQL Statement - All values must be set for the table
 SQL = "INSERT INTO ACC_Log VALUES ('" & Now.ToString("yyyy/MM/dd") & "', '" & Now.ToString("hh:mm:ss") & "', '" & Registers(0) & "', '" & Registers(1) & "', '" & Registers(2) & "')"
 Con.Open() 'Open the database connection
 objCmd = New OleDb.OleDbCommand(SQL, Con) 'Set the command
 objCmd.ExecuteNonQuery() 'Execute the SQL command
 Con.Close() 'Close the database connection
 Catch ex As Exception 'What to do when an error occurs
 Label10.ForeColor = Color.Red
 Label10.Text = "Database Error!"
 End Try
 End If
 End Sub

This timer is originally set for 100ms. When the program starts, it will log the first time and then set the timer interval to 1 minute. (60000ms)

 Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
   Label9.Text = Now 'Display time and date
 Timer1.Interval = 60000 'Set interval for 1 minute
 Timer1.Enabled = True
 Call Sub() Button1_Click() 'Call the routine to get the PLC information and store in a database
 End Sub

This will handle the LinkLabel on the form.

 Private Sub LinkLabel1_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
   ' Specify that the link was visited.
 Me.LinkLabel1.LinkVisited = True
 ' Navigate to a URL.
 System.Diagnostics.Process.Start("http://www.accautomation.ca")
 End Sub
 End Class

ModbusTCP MSAccess 070-min

Running the program:
The status will show ‘Initializing..’ so that the imports can be loading in the program. This will happen each time the software starts.
ModbusTCP MSAccess 083-min

Logging will be displayed in the status to indicate that everything is working correctly.
ModbusTCP MSAccess 080-min

Error messages will show in the status when an error has occurred. We have programmed two errors:
Communication Error! – Information is not being received from the PLC. This could be due to the wrong IP address or communications links have been broken.
Database Error! – Information cannot be written into the database, the database is not present, etc.
ModbusTCP MSAccess 085-min

Here is what our database looks like after collecting a few samples.
ModbusTCP MSAccess 105-min

As you can see, collecting information from the PLC via ModbusTCP and inserting it into an Access database can be easily done. The next steps would be to ensure that the data is always collected. What happens when the communication to the PLC is cut? Robust logging is required. This is when we create a buffer in the PLC of the logged values. Please refer to our EBook ‘Robust Data Logging for Free’ .

Download the sample database, visual basic and PLC code for this project here.

Watch on YouTube : Modbus TCP Data Logging to Database
If you have any questions or need further information please contact me.
Thank you,
Garry



If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.

To get this free article, subscribe to my free email newsletter.


Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.

AdvancedHMI to Solo Process Temperature Controller

Modbus RTU will be the serial (RS485) method in which we will communicate between the AdvancedHMI Screen and the Automation Direct Solo Process Temperature Controller.
We can address up to 247 (Solo 1 to 247) devices on this master – slave protocol. A maximum of 32 devices (Nodes) on the network can communicate to the master. A review of the Modbus RTU protocol can be seen at the following URL.
http://www.rtaautomation.com/technologies/modbus-rtu/

AdvancedHMI is a free HMI programming package the runs on Microsoft Visual Studio. It can be downloaded at the following URL.
https://sourceforge.net/projects/advancedhmi/

Connections:
We will be running the AdvancedHMI software on the computer. One of the USB ports will have an USB to RS485 adapter and communicate RS485 to the Solo process temperature controller.
Solo Process Temp Controller 010 Communication Diagram-min
See the following post to install the USB to RS485 adapter.
http://accautomation.ca/usb-to-rs485-pc-adapter-installation/

Solo Controller Settings:
In the Initial Setting Mode we will change the on line configuration to on and make the changes to the Modbus settings as follows: 9600 Baud, Even, 7 Data Bits, 1 Stop Bit, Modbus ASCII Format. We will leave the default unit number as 1. See the following post to set the controller:
http://accautomation.ca/solo-process-temperature-controller/

Modbus RTU (Addresses)
The following address will be used in our project:
AdvancedHMI to Solo 050-min

AdvancedHMI to Solo 055-min
AdvancedHMI will use the Modbus Decimal value in the PLCAddressValue to determine the information that you want to get. For a list of all Modbus addresses that can be used in your project, refer to the Solo Manual located a the following URL:
https://www.automationdirect.com/adc/Manuals/Catalog/Process_Control_-a-_Measurement/Temperature_-z-_Process_Controllers

Screen Display: (AdvancedHMI)
Here is what our screen will look like:
AdvancedHMI to Solo 010-min
We have mimicked the look of the solo process temperature controller. Our PV and SV values are DigitalPanelMeters from the AdvancedHMI toolbar.  The eight output indicators are just labels.

Our ModbusRTUCom1 settings are as follows:
AdvancedHMI to Solo 030-min
Settings: 9600, 8, Even, One StopBit and Station 1 should all match the settings in the Solo process temperature controller that we did previously.
PollRateOverride will allow us to determine how often the communication will take place to the controller. (250msec)
The PortName will be the same port number that the computer will communicate out of. This will be set when you install the USB to RS485 adapter. It may change if a different USB port is used.

The DataSubsciber1 will be used to determine the status of the controller.
AdvancedHMI to Solo 040-min
PLCAddressValue = 44139

We read the value of the eight status bits and convert this into a string so we can determine the status of each of the individual bits. Here is the code that is used to do this. It is the only code required for this application.

Private Sub DataSubscriber1_DataChanged(sender As Object, e AsDrivers.Common.PlcComEventArgs) Handles DataSubscriber1.DataChanged
        Dim i As Integer = DataSubscriber1.Value
        Dim Status As String
        Status = Convert.ToString(i, 2).PadLeft(8, "0") '8 bits
        'There are 8 bits that we need to check and account for on our screen. 
        'Modbus Decimal - 44139
        'Bit 0 - ALM3 - Alarm 3
        'Bit 1 - ALM2 - Alarm 2
        'Bit 2 - C degrees
        'Bit 3 - F degrees
        'Bit 4 - ALM1 - Alarm 1
        'Bit 5 - OUT 2 
        'Bit 6 - OUT 1
        'Bit 7 - AT - Auto Tuning

The complete AdvancedHMI code for this application can be downloaded at the end of the post.

The PV and SV indicators are DigitalPanelMeters as mentioned above.
AdvancedHMI to Solo 060-min

AdvancedHMI to Solo 065-min
They both have four digits with a decimal position of 1. This will give us a value between 000.0 and 999.9.
The SV includes a keypad to change the set value. KeypadScaleFactor is set to 0.1 to allow for the decimal place.

Included in our display is a BasicTrendChart from the AdvancedHMI toolbar.
AdvancedHMI to Solo 075-min

AdvancedHMI to Solo 070-min
You want to make sure that the YMaximum and YMinimum settings are set so the values will not go past these settings. If they do then the graph line will disappear from the chart at that point and time.
This will show a running trend for the last 5 minutes.
Polling rate is 250msec x 1200 points in the chart = 300 000msec
300 000msec / 1000 = 300 seconds
300 seconds / 60 (seconds in minute) = 5 minutes

Notes: Displaying Extended ASCII Symbols in Visual Studio (VB.NET)
You can display any symbol in the visual studio environment by holding the ‘Alt’ key down and typing the decimal number of the symbol that you want. In our example the degrees symbol is Alt 248.
Here are the extended ASCII symbols:
AdvancedHMI to Solo 020-min
http://www.asciitable.com/

Running the Application:
AdvancedHMI to Solo 085-min

You will notice that the response rate is very quick. (250msec) As the PV, SV or indication values change, the screen will get updated.AdvancedHMI to Solo 090-min

The trend chart will show the last 5 minutes of the PV value. AdvancedHMI to Solo 095-min

As you can see, programming the AdvancedHMI to communicate to the Solo process temperature controller is very easily done.

Download the AdvancedHMI code for this project here.

Watch on YouTube : AdvancedHMI to Solo Process Temperature Controller
If you have any questions or need further information please contact me.
Thank you,
Garry



If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.

To get this free article, subscribe to my free email newsletter.


Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.

Solo Process Temperature Controller

The SOLO Temperature Controller is a single loop dual output process temperature controller that can control both heating and cooling simultaneously. It is available in 1/32, 1/16, 1/8 and 1/4 DIN panel sizes and is UL, CUL and CE approved.

There are four types of control modes:
PID (Auto Tuning (AT) function)
P stands for proportional and accounts for present values of the error – It reacts to the amount of error which is the difference between the SP (Set Point) and the PV (Present Value)
I stands for integral and accounts for past values of the error – It uses math to basically find the approximation of area under the curve.
D stands for derivative and accounts for possible future values of the error, based upon rate of change – It uses math to determine the slop of the error over time and multiply this by the derivative gain.
AT – Auto Tuning as the name implies will automatically cycle your control system through two cycles and set the PID parameters.

ON / OFF
On/Off control is the simplest form of control. In the case of temperature the output will be on when the temperature is below set point. When the temperature gets above the set point of the controller the output will be off. When this cycling occurs frequently, you can add a hysteresis to the output. This will limit the time the output goes on and off by a number of degrees.

Manual
Manual mode is when you need to control the output directly. By entering manual mode the operator can adjust the values of the output(s).

Ramp / Soak control
The Ramp / Soak control mode is used to control the outputs according to the pre-programmed SP patterns with the PID control method. The Solo can have eight programs with eight steps each. Note: This can be increased with the additional use of hardware and software via HMI or PLC.

The available outputs include relay, voltage pulse, current, and linear voltage. There are up to three alarm outputs available to allow seventeen alarm types in the initial setting mode. SOLO can accept various types of thermocouple, RTD, or analog input. This means that cascade control is possible with these controllers.

Cascade (Application)
When you use the output of one of the Solo process controllers as the input to another, this would be cascade control.

It has a built in RS-485 interface using Modbus slave (ASCII or RTU) communication protocol.
The Solo Process Temperature Controller can be configured through the buttons on the front of the unit or by the configuration software. Monitoring of up to four controllers at once can be done thought the same configuration software.

The following is the wiring of the Modbus Serial communication. We will use a USB to RS485 converter from Automation Direct. (USB-485M)
Installation and operation instructions can be found at the following link: USB to RS485 PC Adapter Installation

Solo Process Temp Controller 010 Communication Diagram-min

The solo process temperature controller needs to be setup before we can communicate to it. The default setting is ‘Off’ for the On-Line Configuration. Here is the way to change into the different modes in the Solo.

Solo Process Temp Controller 015 Solo Parameters-min

In the Initial Setting Mode we will change the on line configuration to on and make the changes to the Modbus settings as follows: 9600 Baud, Even, 7 Data Bits, 1 Stop Bit, Modbus ASCII Format. We will leave the default unit number as 1.
Solo Process Temp Controller 011 Solo Parameters-min
Solo Process Temp Controller 012 Solo Parameters-min

Our controller is now set to communicate.

Download the documentation and/or configuration and monitoring software at the following URL link:
http://support.automationdirect.com/products/solo.html

The configuration and monitoring software does not have to be installed. You just need to download the file “slsoft.zip”.
Once downloaded right click on the file and select “Extract All…”. The file ADC1105.exe can now be run.
Solo Process Temp Controller 020 Software Install-min

The recommended screen resolution is 1024 x 768. If you do not have this resolution then there is another program that will allow us to create a shortcut to this program and change our default resolution. After we exit the program, our screen resolution will return to its original state.

Reso is a free application that works well. It can be downloaded at the following URL link:
http://www.bcheck.net/apps/reso.htm

Download the exe file (reso.exe) into the same extracted folder that you have the ADC1105.exe file.
Solo Process Temp Controller 021 Software Install-min

Click on the reso.exe file in the folder to run the application.
Click the Browse… button and select the ADC1105.exe solo configuration software.
Under the Graphics Mode: Resolution: select 1024×768
We can leave the rest to the defaults as shown below. Now Click Create Shortcut.
Solo Process Temp Controller 022 Software Install-min
Put the shortcut in the same directory as the software that was downloaded.

We will receive notification that the shortcut was created. Click OK.Solo Process Temp Controller 023 Software Install-min

Our folder will now look like this.
Solo Process Temp Controller 024 Software Install-min

Click on our shortcut (ADC1105 (at 1024×768)) to start the Automation Direct Solo Series Configuration Software.

There are six icons on the main menu. Follow these in order from left to right to setup or troubleshoot your system.
Solo Process Temp Controller 030 Software-min

Solo Process Temp Controller 031 Software-min

Under the Com port setup we configure the serial port of the computer to communicate to the Solo. In our case we will use COM5, 9600, Even, 7 Data Bits, 1 Stop Bit, Modbus ASCII Format.Solo Process Temp Controller 040 Software-min

In the Configuration menu we will select the address of the controller that we will be communicating. This will be the default of the Solo which is 1.Solo Process Temp Controller 035 Software-min

Selecting Connect will then communicate to the Solo process temperature controller and you will see on the screen a picture of the controller with the PV, SV and indicator lights active. Solo Process Temp Controller 050 Software-min

This screen will now allow you to set up all of the parameters in the Solo. Once you enter a value it will be red on the screen. After hitting enter on the keyboard and the value will then be sent to the controller and be displayed in black again.

Solo Process Temp Controller 060 Software-min

The recorder screen is used to monitor the temperature over time. You can monitor up to ten Solo Controllers at once.

Command Test is used to send individual Modbus command out. This is done in Hexadecimal.

The software for the Solo Process Temperature Controllers is very functional. Using the Reso software, you will be able to put the Solo Software in the 1024 x 768 that it was created for without manually changing the screen every time.

Watch on YouTube : Solo Process Temperature Controller

Watch on YouTube : Analog Input to a Solo Process Temperature Controller
If you have any questions or need further information please contact me.
Thank you,
Garry



If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.

To get this free article, subscribe to my free email newsletter.


Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.