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 - vitico bon

Pages: [1]
1
Support Questions / OPC driver problem
« on: January 09, 2017, 10:01:08 AM »
Archie/Godra,

In my test for OPC I got now data coming, it is a very simple test, just two BasicLabel, one Barlevel, one label to see when the Timer occurs and one ProgressBarEx that need to be handle manually.
This is the code, with some MsgBox for my test:

Imports System.IO   'System library to import so StreamReader could be use
Public Class test

Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
        OpcDaCom1.BeginRead("M20943_A1_Scaled_Value", 1)
        Label1.Text = Now
    End Sub

    Private Sub OpcDaCom1_DataReceived(sender As Object, e As Drivers.Common.PlcComEventArgs) Handles OpcDaCom1.DataReceived
        If e.ErrorId <> 0 Then ' no good data received.
            MsgBox(e.ErrorId)
            Exit Sub
        End If
        MsgBox(e.Values(0))
        ProgressBarEx1.Value = CInt(e.Values(0))
    End Sub

 
    Private Sub test_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class

Now for some reason the BeginRead command is giving me the error “Parameter count mismatch.” Then if I change the # of elements of the BeginRead to 2 the error goes away but the DataReceived event never gets trigger, I also try with a OpcDaCom1.read but it also is giving me error.

Once again thank you guys

2
Support Questions / Modbus fix
« on: January 09, 2017, 09:58:53 AM »
Archie/Godra,

Fist I would like to pass my recognition for the time and effort that you guy  are putting helping me, I hope that the result of all that will be a better and more robust product that is already amazing.   
Today I spent some time testing modbus, I did a fresh download of the 399r version and rebuild the applications. For my test, according to Archie he the 399r version already have the fix. And here is what I found.

Keeping in mind that I am working on a PC application, the goal is to be able to open two identical windows showing/controlling data in two (or more) devices simultaneously, also I use a MDI form as startup that dynamically load as many instances of ModbusRTUCom to collect data for trending and alarms, so I am hitting each device at a frequency of about 2 seconds. 

Now here is what I found with the revised version, I can open one window and all my data comes, then I open another instance of the window to the other device, the data to the second window start coming but the data to the first instance stop coming until I close the second one. Better than before but not quite as I need it, I would like the customer to be able to see data simultaneously in the two windows, also the data collection get affected by this.

Thank you guys.

3
Support Questions / OPC question.
« on: January 06, 2017, 10:37:21 AM »
Ok, since I now need to wait for a resolution on the Modbus driver decided to move on to test the OPC with some of our possible applications. So I made a form with a BasicLabel to read one analog value to start. Based on the attached picture I made the OPCServer = Mission.DA2 (all other parameters were left untouched) and then for the label I entered. "M18994_A2_Value" as the PLC address. But this isn't working.
Any suggestions from the experts? 

4
Support Questions / ModbusRTU
« on: December 28, 2016, 11:49:57 AM »
Hi again Archie,

I am having problems communicating with more than one device (RS485) simultaneously and searching through previous message I see that you referees a lot to a "ModbusBase" file. I don't have that file, I only have "ModbusRTUCom" and "ModbusTCPCom". Is that "ModBusBase" something that was eliminated in newer releases?

Also I will appreciate if you can take a look at this topic where I am explaining the problems I am having right now, and make some suggestions.

http://advancedhmi.com/forum/index.php?topic=1566.0

Thanks a lot!

5
Support Questions / Problem with multidrop Modbus
« on: December 22, 2016, 01:40:33 PM »
Ok here I am again asking for help.

I got my application about 99% done so I am ready to run some test, I had only small issues until I decide to test it using a RS-485 port with two units. (Modbus RTU)

I can connect to unit 1 or 2 with no problem, but when I connect to the two of them the communication  basically stops (keep timing out).  The program was build  using a MDI form. Each time that I click on a system in the menu an instance of a form with some animation comes on, get the unit ID for that particular units and set it on the station address variable “ModbusRTUCom1.StationAddress = CByte(MBaddres)”.  As I said, it works fine one at the time but not when two instances are open.

I ran a test using Cimplicity from GE and I was able to read from both units at the same time with no problem so is not a hardware or wiring problem.

Any suggestion from the experts?

Regards,
Happy holidays.
Victor.

6
Support Questions / Dynamically loading Com driver and BasicDataLog.
« on: December 03, 2016, 11:57:16 AM »
Sorry I have to return to this topic once more. but I have the code shown below loading a communication driver and two basic loggers for each system connected to the PC, everything appears to work  find, data is going to the two files each 20 seconds as expected. But this morning adding a asynchronous read when started to implement the DataReceived event I found out that the first logger (the one reading "F428675") is firing reads every second, the other one dose it timely every 20 seconds. Any suggestion?

           ' Set the name of the files.
            Dim today1 As Date = Date.Today   
            Dim dayDiff1 As Integer = today1.DayOfWeek - DayOfWeek.Sunday
            Dim Sunday1 As Date = today1.AddDays(-dayDiff1)
            LevelFileName = Format$(Sunday1, "MMM-dd-yyyy") & "-L.dlog"
            PressFileName = Format$(Sunday1, "MMM-dd-yyyy") & "-P.dlog"
        For i = 1 To NumberOfSystems

            If (Not System.IO.Directory.Exists(Path.GetDirectoryName(Application.ExecutablePath) & "\DATA\" & Bubbles(i).Bsystem)) Then
                System.IO.Directory.CreateDirectory(Path.GetDirectoryName(Application.ExecutablePath) & "\DATA\" & Bubbles(i).Bsystem)
            End If

            Port(i) = New AdvancedHMIDrivers.ModbusRTUCom
            Port(i).PortName = "COM1"
            Port(i).BaudRate = 19200
            Port(i).Parity = Ports.Parity.Odd
            Port(i).DataBits = 8
            Port(i).PollRateOverride = 1000
            Port(i).StationAddress = Bubbles(i).MBStation
            Port(i).StopBits = Ports.StopBits.One
            Port(i).SwapBytes = True
            Port(i).SwapWords = False
            Port(i).TimeOut = 3000
            Port(i).MyTag = i

            AddHandler Port(i).DataReceived, AddressOf AllDataReceived

            ' Now load two data logger for Level and Pressure.
            l = i * 2
            Logger(l) = New AdvancedHMIControls.BasicDataLogger

            Logger(l).BeginInit()
            Logger(l).ComComponent = Port(i)
            Logger(l).FileFolder = Path.GetDirectoryName(Application.ExecutablePath) & "\DATA\" & Bubbles(i).Bsystem
            Logger(l).FileName = LevelFileName
            Logger(l).LogInterval = 20000
            Logger(l).LogTriggerType = AdvancedHMIControls.BasicDataLogger.TriggerType.TimeInterval
            Logger(l).PLCAddressValue = New MfgControl.AdvancedHMI.Drivers.PLCAddressItem("F428675")
            Logger(l).TimeStampFormat = "MMM-dd-yyyy hh:mm:ss tt"
            Logger(l).EndInit()

            p = (i * 2) - 1

            Logger(p) = New AdvancedHMIControls.BasicDataLogger

            Logger(p).BeginInit()
            Logger(p).ComComponent = Port(i)
            Logger(p).FileFolder = Path.GetDirectoryName(Application.ExecutablePath) & "\DATA\" & Bubbles(i).Bsystem
            Logger(p).FileName = PressFileName
            Logger(p).LogInterval = 20000
            Logger(p).LogTriggerType = AdvancedHMIControls.BasicDataLogger.TriggerType.TimeInterval
            Logger(p).PLCAddressValue = New MfgControl.AdvancedHMI.Drivers.PLCAddressItem("F428679")
            Logger(p).TimeStampFormat = "MMM-dd-yyyy hh:mm:ss tt"
            Logger(p).EndInit()
        Next


7
Support Questions / Dynamically loading ModbusRTUCom and BasicDataLogger
« on: November 11, 2016, 11:36:35 PM »
Hi, I am attempting to load a group of Com and Logger controls in a form but since there is not documentation I am now stuck trying to find all the parameters that need to be code to make this work. I think that I have already most of them but need a litter push to get this done. Maybe there is a sample that I can follow. So far I can't find the way to pass the loaded ComComponent just loaded to the BasicDataLogger control. Here is a piece of my infant code. Other than that, after being working for only a week with this I found it extremely good and very useful. It is a great job what all of you are doing. Thanks.

Here goes my spaghetti code:

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

        Dim Port(8) As AdvancedHMIDrivers.ModbusRTUCom
        Dim ComCom(8) As MfgControl.AdvancedHMI.Drivers.IComComponent
        Dim Logger(16) As AdvancedHMIControls.BasicDataLogger
        Dim Address(16) As MfgControl.AdvancedHMI.Drivers.PLCAddressItem
        Dim S As String

        ' Port(0).
        Port(0).PortName = "COM1"
        Port(0).BaudRate = 19200
        Port(0).DataBits = 8
        Port(0).Parity = Ports.Parity.Odd
        Port(0).PollRateOverride = 100
        Port(0).StationAddress = 1
        Port(0).StopBits = Ports.StopBits.One
        Port(0).SwapBytes = True
        Port(0).SwapWords = False
        Port(0).TimeOut = 3000
        Port(0).ToString()



        Logger(0).ComComponent = ComCom(0)
        Logger(0).FileFolder = Path.GetDirectoryName(Application.ExecutablePath) & "\DATA"
        Logger(0).FileName = "PLCDataLog1.dlog"
        Logger(0).LogInterval = 1000
        Logger(0).LogTriggerType = AdvancedHMIControls.BasicDataLogger.TriggerType.TimeInterval

        Address(0).PLCAddress = "F428675"
        Logger(0).PLCAddressValue = Address(0)
        Logger(0).TimeStampFormat = "dd-MMM-yy HH:mm:ss"


    End Sub


 

8
Open Discussion / Problem upgrading from a previous version.
« on: November 05, 2016, 03:20:32 PM »
I have never used AdvancedHMI until yesterday when I fond a possible application for it. So was very happy when in just 2 hours was able to do a Modbus connection to a Click PLC and star bringing buttons, gauges and other toys into the form and successfully connect to the desired addresses. But then I found a problem with the PilotLite control that only can connect to a byte boundary (it will work properly with address 08193 but no with 08193, same happened with the Alarm control, MomentaryButton work fine with any address.

My fist idea was to upgrade to the new version since I was using an older one. but then then in the new version each time I try to bring a control into the form I got the error in the attached picture, any ideas. Maybe I need to clear something in the registry since I was using the old version.
 
Note that although I have many yeas of experience dealing with VB, I am a novice when it comes to .NET

Will appreciate anyone help since I want to present the idea of using your HMI to my superiors ASAP   

Pages: [1]