Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Archie

Pages: 1 ... 4 5 [6] 7 8
76
Open Discussion / What would you like to see in the next major release?
« on: September 25, 2015, 10:01:42 PM »
Version 3 is in a stage of winding down meaning there will only be bug fixes and minor features added. The plans for version 4 is in the works. I would like to ask what everyone would like to see in Version 4.

A most likely noticeable change will be in the PLCAddress properties. With the upcoming version 4 these properties will not only let you put in an addresss or tag name directly, but also open a dialog that lets you specify scaling parameters. This means current properties like ValueScaleFactor and ValueScaleOffset would go away.

Universal Apps are also being investigated. Under  this format, an AdvancedHMI app would be able to run on a desktop, tablet, phone, and Raspberry Pi.

So if you have any visions of where you like to see the next major version go, please post your ideas.

77
Additional Components / Just Another Gauge
« on: September 13, 2015, 09:31:48 PM »
This one is a work in progress, but I thought I would put it out to make it a community project. It was adapted from this:

https://github.com/bens-unit01/Circular-gauge-2

It currently does not adapt well to various size. The original was locked into a 400x400 size and I started making it able to change size.


78
Tips & Tricks / Tag Database
« on: September 10, 2015, 08:07:05 PM »
Many of the HMI software packages use a tag database to reference PLC addresses by a tag name/alias. This allows you to use an address in multiple places throughout the HMI, but change the actual PLC address in one location.

AdvancedHMI has both the capability of using a direct PLC address in properties such as PLCAddressValue or creating a Tag Name database. The tag name database for AdvancedHMI is referred to as Application Settings. The data is stored in an XML file which allows you to edit the XML file and change addresses without the need of editing in Visual Studio and recompiling.

Here's how you go about using these Application Settings to do the equivalent of a Tag Database:

- Add a driver to the form
- Add a BasicLabel to the form
- In the Properties Window for the BasicLabel, scroll all the way to the top
- You will see Application Settings with a "+" sign next to it. Click the "+" sign
- Click in the (Property Binding) and you will get a button with 3 dots (ellipsis)
- Click on the ellipsis to open a new window of Application Settings for BasicLabel1
- In that Window look for PLCAddressValue, click in the area to get a drop down arrow
- Click (New...)
- Another window will open of New Application Setting
- For Defaultvalue enter your PLC Address (e.g. N7:0, 40001, MyTag, etc)
- For Name enter the Tag Name/Alias you would like to refer to this address as
- Click OK to close the 2 windows

You can now run your application that fetches its PLC address from an equivalent of a Tag Database.


These Application Settings are not limited PLC addresses. For example, let's say you have many forms each with a driver instance and you want them to all have the same IPAddress. Using the same procedure you can create an Application Setting for IPAddress and use that application setting for every driver instance.

79
Open Discussion / How Fast is AdvancedHMI CLX driver?
« on: September 08, 2015, 10:20:45 PM »
Every so often the AdvancedHMI code is optimized for speed and efficiency. The most recent is some optimizing of the ControlLogix driver for the upcoming version 3.99a.

To gauge how well the optimizing is working, I created a very simple test. An array of 1000 DINT tags are created in the PLC. To get a timing, Wireshark is started. Then a read is done of 1000 elements using:

EthernetIPforCLXCom1.Read("DINTArray",1000)

Then using the time stamps of Wireshark based on the first read (service code 0x4c) until the success response of the final partial read, the total time is calculated. The latest tests has shown a total time of 44ms to read all 1000 DINTs.

So how does this compare to other drivers? The same test was done with RSLinx and was taking several hundred millseconds, so no further testing was done. The next test was done with the Kepware OPC driver and resulted in 54ms. And finally the Automated Solutions driver was tested with a result of 55ms.

This simple test shows an almost 20% faster rate than its nearest tested competitor. If anyone has other software they can perform the same test, I would be very interested in hearing the results.

The hardware I tested with is a CompactLogix L35 and a laptop with a core i7 at 2.2Ghz.

Another quick test I did was to put 5 BasicLabels on a form and point them to 5 different tags of different types, then set the PollRateOveride to 0. Based on Wireshark captures, the update rate averages a little over 4ms. Watching CPU usage, it held around 1%. So what does this really mean? A very fast update rate with very little CPU means an HMI can be very responsive even on low end hardware. For example, I ran the same program on a low cost touch panel with a 1.8Ghz Atom processor. At that extremely fast update rate, it still only used 10% of the CPU.

80
Open Discussion / Vote For Your Favorite
« on: August 20, 2015, 08:47:36 PM »

81
Open Discussion / New Expansion Pack
« on: June 23, 2015, 07:51:32 AM »
A new expansion pack has been added to the listings on the main AdvancedHMI web site. This pack includes 3 types of LEDs and a panel that can be locked using a password.

82
Tips & Tricks / ChartBySampling (version 3.98r or later)
« on: June 18, 2015, 08:22:45 PM »
This new control will plot a line (or lines) based on samples a register/tag/variable.

- Add a driver instance to the form and set the PollRateOverride to the desired sample rate
- Add a ChartBySampling
- Set the MaximumActivePoints to the number of points that will stay on the chart
- Add PLC addresses to PLCAddressItems. Each item added will be another series/line
- By default the first series is a bar chart. This can be changed by going to Series property and changing ChartType

83
Tips & Tricks / ChartByArray (version 3.98p or later)
« on: June 14, 2015, 10:07:43 PM »
The new ChartByArray is designed for charting a batch type process. Data is to be sampled in the PLC and stored in an array or data table. Another integer variable in the PLC is used to indicate the next element to be used for the next data sample. If the value of this ArrayIndex goes back to 0, the chart will clear to start again.

The two properties that have to set are PLCAddressArrayIndex and PLCAddressItems. The latter is a collection to allow you to specify more than one array. For example, you may want to plot 2 temperatures.

If using a ControlLogix, you will need to create an array tag for series you want to plot. For instance, if your can create Temp1[1000] for the data and then create another tag for the array index, such as DataIndexTag. In this case you would put DataIndexTag in the PLCAddressArrayIndex property, then add a PLCAddressItem and set PLCAddress to Temp1.

84
Tips & Tricks / Sending an Email Triggered by a Bit
« on: June 08, 2015, 09:36:37 PM »
You can fairly easily send an email with AdvancedHMI based on a bit going True.

- Add a driver to your form and set its properties
- Add a DataSubscriber to the form and set the PLCAddressValue property to the bit you want to trigger the email
- Double click the DataSubscriber to get back to the code
- Enter and modify this code accordingly:

    Private Sub DataSubscriber1_DataChanged_1(sender As Object, e As Drivers.Common.PlcComEventArgs) Handles DataSubscriber1.DataChanged
        '* Make sure Data came back
        If e.Values IsNot Nothing AndAlso e.Values.Count > 0 Then
            '* Did it come back as True or 1?
            If String.Compare(e.Values(0), "TRUE", True) = 0 Or e.Values(0) = "1" Then
                Using email As New System.Net.Mail.MailMessage
                    '* Set who it is from
                    email.From = New System.Net.Mail.MailAddress("advancedhmi@mydomain.com")

                    '* Add the recipients
                    email.To.Add(New System.Net.Mail.MailAddress("receiver@theirdomain.com"))

                    email.Subject = "AdvancedHMI Event Was Triggered"
                    email.Body = "This event occurred"

                    '* Create the client that will send the message
                    Dim MailSendingClient As New System.Net.Mail.SmtpClient
                    '* set this to the smtp server you will use
                    MailSendingClient.Host = "MySmtpServer"
                    MailSendingClient.Port = 25

                    '* If your SMTP Server does not require a password, then remove this section
                    Dim credentials As New System.Net.NetworkCredential("MyUsername", "MyPassword")
                    MailSendingClient.Credentials = credentials

                    '* Send the email
                    MailSendingClient.Send(email)
                End Using
            End If
        End If


If your SMTP server has different requirements, there are many examples on the Internet. Google "send email .NET"

85
Tips & Tricks / Using INI files for Driver Settings
« on: June 02, 2015, 07:44:48 AM »
The EthernetIPforCLXCom and TwinCATCom drivers allow you to use settings from an INI for some of their properties. This allows you to change things like the IPAddress without recompiling the application. Here are the steps on how to set it up:

- In the AdvancedHMI project is a directory named SampleINIFiles, expand down that directory to see the files
- Right Click CLX.ini and select Copy
- Now Right click the AdvancedHMI project and select Paste
- Click on the newly pasted files so you see the properties in the Properties Window
- In the Properties Window change Copy To Output Directory to Copy if newer
- Double click the newly pasted INI file to view its contents
- Change the IPAddress to that of your PLC
- Open the MainForm
- Add an EthernetIPforCLXCom to the form
- In the Properties Window, set the IPAddress property to CLX.ini

When you run the application, the CLX.ini file will be put in the AdvancedHMI\bin\Debug directory with the compiled application. The driver will read that file and use the IPAddress. You can edit that file with NotePad to change the address. This allows you to change the IP Address without recompiling. If you have multiple driver instances across multiple forms, you can specify CLX.ini in all of them, so changing the one INI file will change to that address for all the driver instances.

86
Tips & Tricks / Using C#
« on: May 26, 2015, 09:39:54 PM »
Although AdvancedHMI is based on VB, it is very easy to use C#.

- Open the AdvancedHMI Solution with Visual Studio
- In the Solution Explorer, right click Solution 'AdvancedHMIv35' and select Add->New Project
- Add New Project dialog will pop up
- On the left, drill down Visual C#
- Select Windows Desktop
- On the right, select Windows Forms Application
- Give your project a name, then click OK
- Once the new project is in your solution, Right click the new C# project and select Add->Reference...
- The Reference Manager window will open. Drill down into Solution and select Projects
- Select all three projects in the list
- Click OK to close the Reference Manager
- Build the solution
- You can now add a driver from the Toolbox to your form, then add controls

87
Tips & Tricks / Modbus Addressing
« on: May 18, 2015, 04:01:07 PM »
Some hints when using Modbus with AdvancedHMI.....

The most common addressing is supported such as:

40001
00001
10001

The default are signed integers, but you can force it to use unsigned by preceding the address by a "U". For example:

U40001

32 bit integers and 32 bit floating point are also supported by using the following prefixes:

F40001
L40001

Keep in mind that you are using 4 bytes, so L40001 may overlap L40002. Based on the device you are using. The consecutive 32 bit values may be L40001 and L40003

If you want to force a particular function number, then specify the function followed by a ":". for example:

3:0001


As of version 3.99b, a new prefix is supported for BCD. For example:

B40001

88
Open Discussion / AdvancedHMI on Twitter
« on: May 16, 2015, 09:19:29 AM »
Keep up with what is currently happening with AdvancedHMI development on Twitter:

https://twitter.com/AdvancedHMI

89
Tips & Tricks / AdvancedHMI on a Raspberry Pi
« on: February 28, 2015, 09:18:50 AM »
Here is how to run an AdvancedHMI application on a Raspberry Pi

1) Download the Debian Wheezy image
http://www.raspberrypi.org/downloads/

2) Copy the image to the MicroSD card using Win32DiskImager
3) Install the card and boot up the Pi
4) When it gets to the configuration screen, set it to expand the image and also to boot to a Graphical User Interface
5) Select Finish in the configuration and Reboot
6) Once booted into the GUI, open a Command Prompt
7) Type these series of commands:

sudo su
apt-get update
apt-get install mono-complete
apt-get install mono-vbnc

8 ) Put in a memory stick with an AdvancedHMI application on it
9) In the command prompt, use the "cd" command to browse to the memory stick to the directory /bin/debug
10) mono AdvancedHMI.exe

In a few seconds the application should start.

There are a few things you may run into.

- You cannot use an OPC server because it is not a .NET application
- The MessageDisplayByValue may stop the application because it uses a speech library. There is a work around. Find System.Speech.DLL on your Windows PC and copy the file into the /bin/debug directory

90
Tips & Tricks / The Cost of Implementing Large Displays Keeps Dropping
« on: February 27, 2015, 09:16:29 AM »
These are a couple pictures of some systems I have been experimenting with. The first is using a $129 PC with Intel's new Soc and Windows 8.1 pre-loaded.  It's connected to a 60" TV

Pages: 1 ... 4 5 [6] 7 8