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

Pages: 1 2 [3] 4
31
Support Questions / OmronEthernetFINSCom
« on: December 18, 2018, 06:56:05 AM »
Hi, i found with newest version 3.99y beta that OmronEthernetFINSCom driver , option TreatDataAsHex dont give right values in barlevel control.

32
The label stuff is only for explaining purpose, not the real text. Im more of  a LAD programming PLC person, so i dont know much about visual basic language and its structure, so maybe that looks easy to you guys who are experts of doing with .vb , but im learning things that way .

Btw thanks for support


33
Thats my code now
Code: [Select]
'***********************************************************
    '* If labeled is clicked, pop up a keypad for data entry
    '***********************************************************
    Dim KeypadText1 As String
    Protected Overrides Sub OnClick(e As System.EventArgs)
        MyBase.OnClick(e)

        Dim ex As MouseEventArgs = e

        Dim kordinatax = ex.X


        If kordinatax < (Me.Size.Width / 2) Then
            KeypadText1 = "xxxxx"
            PLCAddressKeypad = "D12000"

        ElseIf kordinatax > (Me.Size.Width / 2) Then
            KeypadText1 = "yyyyy"
            PLCAddressKeypad = "D12001"
        End If

        If m_PLCAddressKeypad IsNot Nothing AndAlso (String.Compare(m_PLCAddressKeypad, "") <> 0) And Enabled Then
            If KeypadPopUp Is Nothing Then
                KeypadPopUp = New MfgControl.AdvancedHMI.Controls.Keypad(m_KeypadWidth)
                AddHandler KeypadPopUp.ButtonClick, AddressOf KeypadPopUp_ButtonClick
            End If
        End If
        KeypadPopUp.Text = KeypadText1
        KeypadPopUp.Value = ""
        KeypadPopUp.StartPosition = Windows.Forms.FormStartPosition.Manual
        KeypadPopUp.Location = New Point(400, 50)
        KeypadPopUp.TopMost = True
        KeypadPopUp.Show()
    End Sub

But this is for only one BarLevel on Form and it works fine. But i have multiple BarLevels in form, soo now if i click on any BarLevel its the same two texts. I need to display "xxxxx?" or "yyyyy" for BarLevel1 and "aaaaa" or "bbbbb" for BarLevel2 etc..  All locations and sizes for all BarLevels have on "MainForm". Is it possible to get all needed variables from MainForm.vb to BarLevel.vb so i can make texts for all BarLevels individualy?Or any other advice how to solve that

34
Maybe i didnt say correctly in previous post. When i start solution, when first time BarLevel is clicked text is displayed as you set under BarLevel properties keypadtext, or if you leave blank, nothing is displayed. The next time when BarLevel is clicked ,if clicked on left side of the BarLevel first time it displayed xxxxx, if on the right side it displayed yyyyy.

35
I tried with adding a suggested code, but it didnt work, still the same.

36
Finally get it done about BarLevel click position.

Code: [Select]
Private Sub BarLevel3_MouseClick(sender As Object, e As MouseEventArgs) Handles BarLevel3.MouseClick

        kordinatax = e.X

        If kordinatax < (Var(3) / 2) Then
            BarLevel3.KeypadText = "xxxxxx"
            BarLevel3.PLCAddressKeypad = "D12000"

        ElseIf kordinatax > (Var(3) / 2) Then
            BarLevel3.KeypadText = "yyyyyy"
            BarLevel3.PLCAddressKeypad = "D12001"

        End If

Entry from keypad write in right register, but when the keypad pop up on screen the keypad text is from previous click. Any suggestions?

37
Support Questions / Re: BarLevel Value Alignment question
« on: December 14, 2018, 11:15:56 AM »
Maybe this question doesnt belong in this topic, i wanna extended that when i mouse click on my BarLevel, keypad pop up and i could write to holding register. I add the code  to BarLevel, like one of post from Archi says.
What about if i  wanna click on left half of BarLevel and write to register"1" and when i click on right half of BarLevel write to register"2". Any form from AHMI which can do that? Or i must track mouse position, and  then in click handler do the job?

38
Support Questions / Re: BarLevel Value Alignment question
« on: December 13, 2018, 05:46:14 AM »
I had trouble with errors when i try to upgrade to latest AHMI version so i just changed code from BarLevelEx, delete line 69 and change  to
Code: [Select]
If m_CenterValue <> value Then
                m_CenterValue = value
                Invalidate()
            End If
now its working like a charm.
Thanks for help.

39
Support Questions / Re: BarLevel Value Alignment question
« on: December 12, 2018, 01:07:45 PM »
I have done project with 3.99x i think, i ll try update to 3.99y. But in version 3.99x looks like only when fill to right cant change align, all other options up,down works

40
Support Questions / Re: BarLevel Value Alignment question
« on: December 12, 2018, 08:13:30 AM »
Thanks that is what i need. But that modification seem that if  you set fill to right, u cant change CenterValue to False again and vica versa, it is always True.

41
Hi,

is it possible to align shown value of BarLevel form to center of BarLevel, instead of right by default? My fill direction is set to right.


42
If i am not mistaken, s7-1200 cpu's support modbus tcp communication, soo i think that Ahmi modbus tcp communication will work too, but i didnt try it yet. In the near future i can report when i try.

43
Open Discussion / Re: Omron Ethernet(Fins) driver via internet
« on: March 15, 2017, 03:51:36 PM »
It works that way, but only with UDP protocol. For some reasons TCP dont work on my CJ2M cpu.

44
You can just add new windows form Project->Add windows form. Then from toolbox drag modbus driver to your new form. Click on ModbusTCPCom1 driver below, you can see ModbusTCPCom1 properties in the right down corner. There you can set ip and port.  In this case you dont need to write any code.

45
Open Discussion / Omron Ethernet(Fins) driver via internet
« on: March 13, 2017, 02:44:01 AM »
Hi, is it possible to get data to AHMI via internet? I made that i can connect to public ip address and then port forward to my plc.  When i connect to my plc via programing software (cx-programmer) i can connect to plc with no problem (monitoring, programing). When i try to get data to Ahmi app, i get error EIPTransport.SendData-No Response.

Pages: 1 2 [3] 4