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

Pages: 1 [2] 3 4 ... 343
16
Support Questions / Re: How to Avoid PLC and PC timeouts
« on: February 28, 2024, 04:08:32 PM »
Are you using v3.99x or 3.99y ?

How are you reading data in the code? Read or BeginRead? How frequently are you reading?

17
Support Questions / Re: Changing the Look of a Button
« on: February 28, 2024, 02:37:34 PM »
- In Solution Explorer expand down AdvancedHMIControls
- Exapand down the Controls folder
- Right Click BasicButton.vb and select View Code
- Go down to about line 405, just below #Region "Events"
- Add this code
Code: [Select]
    Protected Overrides Sub OnEnabledChanged(e As EventArgs)
        MyBase.OnEnabledChanged(e)

        If Not Me.Enabled Then
            Me.BackColor = Color.Black
        End If
    End Sub

18
Hi Archie,
I have tested the driver with two devices connected via a usb-Rs485 converter with polling time 100ms and time out 300;
the stable 3.99x version works correctly,
the new version (3.99xbeta4), on the other hand, always generates TimeOut errors on the controls.
This is on the list to be looked into.

19
Support Questions / Re: Changing the Look of a Button
« on: February 26, 2024, 10:01:06 AM »
You can use the PLCAddressAhighlight property to change the color. Put the same address as used in PLCAddressEnabled

20
Support Questions / Re: Adding Conditions
« on: February 23, 2024, 10:36:41 AM »
The easiest way to do this is to use a DataSubscriber2 to watch all the variables. Then in the Datasubscriber2 code set the Visible property of the BasicButton

21
Support Questions / Re: RE: Make Global Object
« on: February 22, 2024, 08:36:06 PM »
The IPAddress you checked, was that in the editing of the GroupedObject? Do you get an error in the BasicLabel on the grouped object?

22
Support Questions / Re: RE: Make Global Object
« on: February 21, 2024, 12:01:42 PM »
If you Build the Solution, do you get any errors?

23
Looks like you are using VB syntax in a c# program. c# is going to be stricter with case sensitivity and type conversions.

Your code would look something more like this:

            label4.Text = (int.Parse(label3.Text) - int.Parse(BasicLabel1.Text)).ToString();

24
Only the live value should be a BasicLabel. The other two will be updated via code, so they should only be of type Label.

- From the toolbox, add a Timer to the form
- Set the interval property to the time you want in milliseconds
- Set Enabled to True
- Double click the timer to get back to code
- Add code similar to this:
Code: [Select]
Try
  Label1.Text=BasicLabel1.Text
  Label2.Text=Label1.Text - BasicLabel1.Text
Catch ex as exception
  Label2.Text=ex.message
End Try

25
Support Questions / Re: Modbus 16bit addresses Read Only
« on: February 13, 2024, 08:02:42 AM »
- Add a BasicIndicator to the form
- Set PLCAddressSelectColor2 to 30209.0
- Set PLCAddressSelectColor3 to 30209.1

26
Support Questions / Re: Modbus 16bit addresses
« on: February 12, 2024, 07:16:33 PM »
I checked the code and it will use function code 6 if there is only a single register to read.

27
Support Questions / Re: Modbus 16bit addresses
« on: February 12, 2024, 01:31:03 PM »
AdvancedHMI uses function code 3 to read 16 bit registers and function code 16 to write them.

Normally you use addresses in the 40000+ range, such as 40001

I

28
Open Discussion / Re: ON/OFF Button for bit in a register Modbus TCP
« on: February 05, 2024, 01:24:07 PM »
in conjunction with the subtract you want to use a logical AND.

ModbusTCPCom1.Write("40001", Value AND (65535 - 2 ^ (b_Num - 1)))

I can't test that right now, but the 65535 assumes it is an unsigned 16 bit integer, it may need to be a 32767

29
That piece of code should only be in the MainForm or the Mainmenu form, which would be the only form being closed to exit the application.

30
can you ping the IP address?

Pages: 1 [2] 3 4 ... 343