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.


Messages - lonconao

Pages: [1]
1
Oh boy, i found the solution. Event handler is datareturned not datachange.

Even so, I ask, DataChange manipulates the information that goes from the master to the slave stations?

Thanks

2
Hello guys

Waiting for you to be well, I write to ask for your help.

I have been doing some tests for a program that I am doing based on Arduino and I have the following problem

When using Datasubscriber 2 with the DataChange event manipulator it seems to me that the values ​​change only once, although according to the microcontroller screen is constantly changing. I use a label to corroborate if it is true and apparently it is so. I have also used the system debugger and the same. I attach the code and some screenshots waiting for some help from you. I can not know if it is a problem of the label or it is that the values ​​are updated only once.

Code: [Select]
    Private Sub DataSubscriber21_DataChanged(sender As Object, e As Drivers.Common.PlcComEventArgs) Handles DataSubscriber21.DataChanged

        Dim p(12) As Double

        If e.Values IsNot Nothing Then
            Me.Label5.Text = ""
            For i = 0 To 11
                p(i) &= CType(e.Values(i), Double) / 10.0
                Me.Label5.Text &= p(i) & Environment.NewLine
                'Me.Label5.Refresh()
            Next
        End If
    End Sub

https://ibb.co/PDfztWQ
https://ibb.co/XV7GHqZ
https://ibb.co/jTHNhGs

3
Support Questions / AdvancedHMI on vscode?
« on: November 12, 2020, 11:03:11 AM »
Good day for all

I have a noob question

Is possible coding, test and build ahmi on vscode? I got used to programming without using WinForms.

Thanks for your responses

4
Support Questions / Re: AdvancedHMI with arduino
« on: October 02, 2020, 02:20:47 PM »
Hi

Use this library on Arduino
Quote
https://github.com/andresarmento/modbus

Then offset registers in 1 (substract 1 to register on ahmi or vice versa on arduino)

5
Support Questions / Re: Can't change com port via combobox on Modbus driver
« on: September 29, 2020, 01:45:37 PM »
I found the problem  :o. When i created a new object ModBusRTUCom1, i just reference that name on click button and the other components in form doesn't "know" what is the name of this new component (there was already another object called ModbusRTUCom1 in the form designer), then they did not receive data.

6
Support Questions / Re: Can't configure manually com port on Modbus driver
« on: September 29, 2020, 12:23:37 PM »
If i configure the component from properties box, works well. But, from code on main, doesn't work. In attachment, i change COM port 4 to 6, and nothings happen (COM4 in this case, sends data)

7
Support Questions / Re: Can't configure manually com port on Modbus driver
« on: September 29, 2020, 12:18:01 PM »
Thanks Godra for your response, i changed the first segment of code. In second segment, i analyzed variables with debugger and effectively function SelectItem returns an object. However, i used a cast with CSting (before your response) and problem still happens. I think that's a error relationed to component and event (only overwrite the value when event button_click is active).

Any form to evaluate expression MBDriver.PortName with debugger when event button_click changed the value?

Sorry for questions, i am c/c++ programer, i am fully newbie in VB.NET and C# (yet)


8
Support Questions / Can't change com port via combobox on Modbus driver
« on: September 28, 2020, 10:51:59 PM »
Good day
I have a problem setting com port on modbus rtu driver. I use the next code

Code: [Select]
Private Sub MainForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim ports As String() = SerialPort.GetPortNames()
        Dim port As String
        For Each port In ports
            ComboBox1.Items.Add(port)
        Next port
    End Sub

Code: [Select]
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        Dim MBDriver As New AdvancedHMIDrivers.ModbusRTUCom

        MBDriver.PortName = ComboBox1.SelectedItem()
        MBDriver.BaudRate = 9600
        MBDriver.StationAddress = 1

        MsgBox("OK", MsgBoxStyle.Information, MBDriver.PortName)

    End Sub

COM ports are listed on a combobox correctly, but, when i try to apply selected com port to driver, it doesn't change. In AHMI v3.99y works perfectly. Now i using AHMI 3.99xR1

Any suggestion?

Additional


9
Support Questions / Re: Problems with Mono Drivers and VS2017
« on: February 20, 2019, 12:50:05 PM »
Thanks, I'll try it now  ;D

10
Support Questions / Re: Problems with Mono Drivers and VS2017
« on: February 20, 2019, 12:16:54 PM »
Quote
The AdvancedHMI serial drivers have been since updated to support Mono. Try the driver ModbusRTUCom in AdvancedHMI.

Thanks Archie, is a new version? I'm using version 3.99x

11
Support Questions / Problems with Mono Drivers and VS2017
« on: February 20, 2019, 12:03:45 PM »
Hello to everyone

I have a problem with mono drivers uploaded in this forum and vs2017.
I followed all steps in this post

Quote
https://www.advancedhmi.com/forum/index.php?topic=1975.0

But, when i try to add MonoRTUCom from toolbox i get following error (attached)



Can someone help me please? I'm a novice user on Visual Studio but I've never had problems using AHMI with windows os or win components

greetings from Chile



Pages: [1]