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 - ASF

Pages: [1]
1
Support Questions / Application loses comms to PLC when pump runs
« on: April 01, 2018, 03:14:25 AM »
I have an Advanced HMI application running my garden watering system. It all works as desired, but whenever the pump runs, the comms to the PLC (Click Koyo using Modbus TCP) drop out until the pump stops. Since the pump only runs for a minute or so every other day, it's not a major drama, but I'd like to get to the bottom of why it's happening - especially since my "stop pump" button doesn't work while the pump is running.

I've ruled out as best I can any physical-level problems - my ethernet infrastructure is very well segregated from the power to the pump, and the pump is just a little single phase DOL unit, so there's no funny business going on with VSD's and interference.

On my main display, there are a few things that happen when the pump starts. There is a water pump object which animates to green. There are some graphics that become visible to indicate watering. There is a basic label which may or may not animate a different colour, depending on which zones are being watered (comms problems exist regardless of which zones are being watered). Various level readings and a tank graphic will update as the tank level changes.

When the pump stops, some VBA runs to log the watering details, which includes data gathered from the PLC. This all happens fine, so apparently the comms come back pretty well immediately once the pump stops.

I'm assuming that there must be some object on the display causing problems when it becomes visible or animates. How might I start trying to track down the culprit? Is there any datalogging/event logging that goes on behind the scenes that I can look at to try and narrow down my search?

2
Support Questions / Store file path in application
« on: October 05, 2017, 06:52:06 PM »
Hi all,

I have an AHMI application which runs some external scripts from a folder, and logs to some CSV files in another folder. Because the application is running on a Compute Stick (very lightweight PC), I have to do the development on a different machine and then copy the files across.

When I want to test my changes, I just plug in the development PC and get my changes debugged, and then copy over to the runtime PC. The only problem is, if I want to make changes to the data logging or script calling, I can't do that, because the file structure is different on the development PC to the runtime PC, so all my code points to non-existent directories.

What I'd like to do is have the code more generic, and have it retrieve the required filepath from a settings screen, so that when I run it up on the development machine to test, I just have to change the filepath on the settings screen, and it will run fine. Then when I transfer it to the runtime PC, I change it back.

I have no problems with using VB to call the file select dialog to select my filepath, and I can probably then integrate that filepath into my code without too much trouble - but what I don't know is how the selected filepath can be "saved" within the application, so that if the PC gets rebooted, it's still got that filepath saved somewhere, and I don't have to re-select it every time the PC boots up.

Is there a way to do this?

3
Support Questions / Detect PLC connection lost in VB
« on: April 21, 2017, 01:19:17 AM »
I have a PC running AdvancedHMI, connected to my PLC via USB-Ethernet adaptor, which is turning out to be quite flaky. I'm going to replace it, but while I have a more or less constant stream of comms failures, I'd like to find a way to programatically detect that comms failure, and take appropriate action.

For the most part, the action I want to take is to prevent certain subs from running until the connection to the PLC is restored again, and all of the tag data has been updated.

Is there any way I can address the comms driver directly, to detect a change in the connection status and take action accordingly?

I'm using the Modbus TCP driver.

4
Support Questions / Debug message
« on: March 15, 2017, 01:18:07 AM »
I have a page with a DataSubscriber2 on it, and each time I open this page at runtime I get a VBA error, which points to this object. The error details are copied below. I have checked and double checked the setup of the object to make sure I've entered all my address details correctly, and written the VBA correctly, and I can't find a fault. Also - if I click Continue, the code continues to work. I know this, because the DataSubscriber is monitoring all of the date/time data from the PLC, and updating some text on the page to show the current PLC date/time. While the error is on the screen, and after I click continue, it continues to count up the seconds and minutes just fine.

I tried running the page from within the development environment, and I get the same error. If I click continue, it dumps out of the runtime with another error. While playing with this, I accidentally unchecked the "break when this type of error is encountered", and now it goes straight to dumping out of runtime as soon as I try and load this page.

So, a couple of things I'm trying to work out:
- How do I get that box re-checked, so it "breaks" on this type of error again?
- What's going on with the error in the first place, and how do I fix it?

Error data:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at MfgControl.AdvancedHMI.Display_SystemSettings.DataSubscriber21_DataChanged(Object sender, PlcComEventArgs e) in Z:\Alan\2205 Watering System\Programs\SCADA\AdvancedHMI\Display_SystemSettings.vb:line 18
   at AdvancedHMIControls.DataSubscriber2.DataChangedSync(Object sender, PlcComEventArgs e) in Z:\Alan\2205 Watering System\Programs\SCADA\AdvancedHMIControls\Components\DataSubscriber2.vb:line 253


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1586.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
AdvancedHMI
    Assembly Version: 3.9.9.18
    Win32 Version: 3.9.9.18
    CodeBase: file:///C:/Watering%20System/Programs/SCADA/AdvancedHMI/bin/Debug/AdvancedHMI.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 10.0.0.0
    Win32 Version: 14.6.1586.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1586.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1586.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1586.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1586.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1586.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1586.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1586.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
MfgControl.AdvancedHMI.Drivers
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Watering%20System/Programs/SCADA/AdvancedHMI/bin/Debug/MfgControl.AdvancedHMI.Drivers.DLL
----------------------------------------
AdvancedHMIControls
    Assembly Version: 3.9.9.18
    Win32 Version: 3.9.9.18
    CodeBase: file:///C:/Watering%20System/Programs/SCADA/AdvancedHMI/bin/Debug/AdvancedHMIControls.DLL
----------------------------------------
MfgControl.AdvancedHMI.Controls
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Watering%20System/Programs/SCADA/AdvancedHMI/bin/Debug/MfgControl.AdvancedHMI.Controls.DLL
----------------------------------------
AdvancedHMIDrivers
    Assembly Version: 3.9.9.18
    Win32 Version: 3.9.9.18
    CodeBase: file:///C:/Watering%20System/Programs/SCADA/AdvancedHMI/bin/Debug/AdvancedHMIDrivers.DLL
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1586.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.



5
Support Questions / Trigger VBA sub at certain time of day
« on: March 06, 2017, 10:58:18 PM »
Hi,

I have a VBA sub which, when a button is clicked, gets a value from a text file and writes it to the PLC. This text file is updated at 5:30am every day, so what I would like is for this VBA sub to run automatically every day at 6am, so that my value is automatically updated every day, whether or not I click the button.

Is there any way of triggering a VBA sub based on time of day?

I have an always-updating, hidden form that sits out of sight and handles all of my background tasks like this, so there's no issues with which form is open at 6am, and the code itself is working - all I need is a way of triggering it.

I could put a data subscriber on the hidden form and monitor the PLC's RTC, and watch for it being "6", but I'm hoping there's a cleaner way...

Thanks!

6
Support Questions / Alarm List - Using MessageListByValue?
« on: March 06, 2017, 10:41:16 PM »
I'm trying to set up a dynamic alarm display for the first time on AdvancedHMI. As far as I can tell, there isn't a specific object for this yet (unless one has been added since the posts I found on the subject?)

I found a post that talks about using a MessageListByValue to do this. Are there any examples out there of how to set this up?

I'm using a Click Koyo Ethernet PLC, and my alarms are C register bits, modbus addresses 16485 through 16499.

7
Support Questions / Reusable popups & multiple tag values in captions
« on: December 30, 2016, 08:38:29 PM »
Hi all,

A couple more newbie questions. My SCADA background is mostly FTView, so I'm trying to figure out the AdvancedHMI way of doing a couple of things.

First, on FTView I can create reusable popups by using placeholder tags. So, for a Motor popup, my start buttons is set to operate on #1.Start, my Stop button is set to operate on #1.Stop, and so on. Then, at runtime, I call the popup and specify which PLC tag to use in place of #1 by either parameter files or just defining the tag directly when I call the popup. So I specify Motor_1, and then #1.Start becomes Motor_1.Start and so on. Can I create reusable popups somehow in AdvancedHMI?

Second thing I can do in FTView is to display multiple tag values in one text object. This would be useful in one particular example where I'm using a Click Koyo PLC and want to display a date-and-time stamp. Ideally, I'd just use system data values to concatenate a string of the date and time within the PLC, and just display that string on the HMI, but the Click Koyo is pretty limited in it's string handling, and I can't find a nice neat way to do it. So, what I'd do to get around this in FTView is just create some text, where the caption was:

"Time of Event: [year_tag]-[month_tag]-[day_tag] at [hour_tag]:[minute_tag]:[second_tag]"

So I only need one text object, not one for each value and another for each separator. Can I do something similar in AdvancedHMI?

Thanks!

8
Support Questions / Rotate and group objects
« on: December 27, 2016, 04:05:43 PM »
Hi guys,

Trying out AdvancedHMI for the first time and so far so good. There are so far just a couple of things I haven't been able to work out and wondering if they're possible. They may actually be Visual Studio questions rather than AdvancedHMI, but worth a shot.

The first is how to rotate something - in particular, text. I'd like to have some text read from bottom to top, like a Y-axis label on a graph. I can't find any detail on how to rotate anything searching for either AdvancedHMI or Visual Studio, but I'd like to think that it must be possible to rotate an object 90 degrees!

The second is how to group objects together, so that I can move them as a block or assign visibility to a bunch of objects as a whole. On searching, I found one thread describing how to group objects in Visual Studio, but it referred me to a menu I can find no trace of, so I'm stumped!

Any pointers greatly appreciated!

Pages: [1]