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

Pages: 1 [2] 3 4 ... 9
16
Open Discussion / Re: Modbus-RTU help
« on: January 22, 2021, 10:17:14 AM »
Thank you Archie and Godra for all the help.

I've successfully completed the project.

Hope we might have OPC server and client added to the new version.

17
Open Discussion / Re: Modbus-RTU help
« on: January 21, 2021, 09:28:46 AM »
Hi Archie and Godra,

Thanks both for the support and quick reply. I've started using NModbus and successfully created Modbus-TCP slave which I was able to test successfully with modscan64.

Now I'm stuck at reading the data back from Master. If you could please help me with that It will be very helpful.

18
Open Discussion / Re: Modbus-RTU help
« on: January 20, 2021, 09:28:32 PM »
Hey godra,

I've been trying to get the NModbus connected but since all the codes are written in c# I'm unable to advance more into it. Can you please guide me with an example of NModbus in vb.net.

19
Open Discussion / Re: Modbus-RTU help
« on: January 20, 2021, 09:20:38 PM »
hey archie,

never used opc can you please guide me how to?

I don't have OPC Server in place. What other options do I have in my hands..

20
Open Discussion / Modbus-RTU help
« on: January 20, 2021, 08:10:58 AM »
Hi All,

I'm looking for Modbus-RTU Slave communication. I've tried using Shortbus but failed drastically. Can some one please guide me in right direction or help me figure out with Modbus-RTU slave comms. in vb.net.

I've designed siemen's drivers around Advanced HMI using libnodave successfully. I'm collecting the data also. Now that data needs to be shared with other scada using either OPC DA/UA server or Modbus-RTU/TCP slave. I cannot find support to any of these drivers over here. Can some one please help me.

21
Open Discussion / Increasing speed of DataSubscription
« on: November 17, 2020, 07:42:13 AM »
Hi,

I've designed communication protocol for modified Modbus-RTU protocol designed by local programmer in STM-32 micro-controller. I've tried designing protocol with SUBSCRIPTIONS as in AHMI. Problem is my system gets slower as the no. of components increases. Can anyone suggest a better alternative then the timers which will not hang my system and make it fast just like original AHMI.

22
Open Discussion / Re: Help with GDI+
« on: January 30, 2020, 11:35:58 AM »
Code: [Select]
   
Private Sub DrawLines(ByVal lngth As Single)
        Dim objPen As Pen
        Dim objPicGraphics As Graphics = Graphics.FromHwnd(hwnd:=PaintBox().Handle)
        objPen = New Pen(Drawing.Color.Black, 1.5F)
        objPen.DashStyle = Drawing2D.DashStyle.Solid

        WidthLen = CInt((PaintBox.Width - leftPad - RightPad) / 8)

        objPicGraphics.PageUnit = GraphicsUnit.Millimeter
        objPen.LineJoin = Drawing.Drawing2D.LineJoin.Round

        Dim angleRadians As Double = (Math.PI / 180.0) * angle

        Dim a As New PointF(4, 100)
        Dim b As New PointF(lngth, 100)

        objPicGraphics.DrawLine(objPen, a, b)

    End Sub

23
Open Discussion / Help with GDI+
« on: January 30, 2020, 09:51:52 AM »
Hi..

I've been stuck Please help me.

My project contains a recipe where there are parameters

1. Line length
2. Angle
3. Direction

Every recipe has maximum 10 steps. Every time an length is written the program draws the line and every time an angle and direction is introduced the x,y co-ordinate will draw a line at the given angle, in a given direction, at a given length from the point where the last drawn line has finished.

Now the problem is I'm able to do all the things and draw but certain times my lines go out of the control{Picture Box}.

I hope some one here might help me with this.

24
Open Discussion / Siemens-ISOTCP Digital read problems
« on: January 17, 2020, 02:04:45 AM »
Hi All,

Some time before I've used AdvancedHMI updated by Bryan Goose for Siemens PLC communication via Ethernet.

I was able to communicate with S7-1200 P.L.C. And able to get Read and Write all the variables data.

The problem starts when recently the customer changed the PLC program.

Originally the Bryan Goose Siemens Wrapper around AdvancedHMI using Libnodave had problems that it was unable to read Digital M bits after M0.0 i,e. from M0.0 to M0.7

I've tried and was able to update it and extend it from M0.0 to M2.7. But as I try to extend it further I'm unable to extend it. No error is thrown and it always shows 0. It is even unable to change the state.
The only problem is with writing of digital Tags.


I hope some1 might be able to help me with that...

Quote
    '*********************************************************************************
    '* Parse the address string and validate, if invalid, Return 0 in FileType
    '* Convert the file type letter Type to the corresponding value
    '* Reference page 7-18
    '*********************************************************************************
    Private RE1 As New Regex("(?i)^\s*(?<DataArea>([IQMTCSV]))(?<DataType>([BWD]))?(?<Offset>\d{1,4}).?(?<BitNumber>\d{1,3})?\s*$")

    Private RE2 As New Regex("(?i)^\s*\w{2}?(?<DBDataBase>\d{1,4}).\w{2}(?<DataType>([BWD]))?(?<Offset>\d{1,4}).?(?<BitNumber>\d{1,3})?\s*$")
    'Private RE2 As New Regex("(?i)^\s*(?<FileType>[SBN])(?<FileNumber>\d{1,3})(/(?<BitNumber>\d{1,4}))\s*$")
    Private Function ParseAddress(ByVal DataAddress As String) As ParsedDataAddress

        Dim result As New ParsedDataAddress

        result.DataArea = 0  '* Let a 0 indicate an invalid address
        result.BitNumber = 99  '* Let a 99 indicate no bit level requested

        '*********************************
        '* Try all match patterns
        '*********************************
        Dim mc As MatchCollection

        If DataAddress.Chars(0) = "D" Then 'If address atarts with D then use the DB version of Match
            mc = RE2.Matches(DataAddress)
            result.DataArea = "D"
        Else
            mc = RE1.Matches(DataAddress)
            result.DBDataBase = 1
        End If


        If mc.Count <= 0 Then
            'mc = RE2.Matches(DataAddress)
            'If mc.Count <= 0 Then
            Return result
            '    End If
        End If

        '*******************************************************************
        '* Keep the original address with the parsed values for later use
        '*******************************************************************
        result.PLCAddress = DataAddress


        '*********************************************
        '* Get elements extracted from match patterns
        '*********************************************
        If mc.Item(0).Groups("BitNumber").Length > 0 Then
            result.BitNumber = mc.Item(0).Groups("BitNumber").ToString
        End If

        '* Was an element number specified?
        If mc.Item(0).Groups("Offset").Length > 0 Then
            result.Offset = mc.Item(0).Groups("Offset").ToString
        End If

        '* Get DataArea
        If mc.Item(0).Groups("DataArea").Length > 0 Then
            result.DataArea = mc.Item(0).Groups("DataArea").ToString
        End If

        '* Get DataType
        If mc.Item(0).Groups("DataType").Length > 0 Then
            result.DataType = mc.Item(0).Groups("DataType").ToString
        End If

        '* Get DataBase
        If mc.Item(0).Groups("DBDataBase").Length > 0 Then
            result.DBDataBase = Convert.ToInt16(mc.Item(0).Groups("DBDataBase").ToString)
        End If


        '**************************************************************************
        '* Was a bit number higher than 15 specified along with an element number?
        '** To let wrapper select bits from M0.0 to M2.7 [15 was replaced to 32 by MUSTAFA]
        '**************************************************************************
        If result.BitNumber > 32 And result.BitNumber < 99 Then
            '* IO points can use higher bit numbers, so make sure it is not IO
            If result.DataArea <> &H8B And result.DataArea <> &H8C Then
                result.Offset += result.BitNumber >> 3
                result.BitNumber = result.BitNumber Mod 8
            End If
        End If

        Return result
    End Function


25
Hey Sprungmonkey,

In the old version of AdvancedHMI someone has included a libnodave and created a wrapper. Though it is not that good but yes it performs well with S7-1200 series of PLC. I might have kept a copy of that to create a workaround for those drivers.

26
Open Discussion / Re: ModbusTCP Write Function
« on: September 27, 2019, 11:02:43 PM »
I've attached the Screen-Shot please look into it and see if you can help me..

27
Open Discussion / ModbusTCP Write Function
« on: September 27, 2019, 02:24:45 AM »
Trying to Write Data to ModbusTCP Simulator ModRSsim2 software at 127.0.0.1

I'm using a button to call write function

ModbusTCPCom1.Write("400002", "100")

but the values don't get written to it.
Something I'm missing or doing wrong. Can anyone help me please...

28
Tips & Tricks / Re: Printing to a Zebra Printer from AdvancedHMI
« on: July 18, 2019, 10:50:06 PM »
Hi,

We did a project in 2015 where we were printing data to Toshiba and Zebra Label Printers and with there *.prn files it was a lot easy

Herein attached is the code for the same

            Dim ToshibaStr As String = "{D0281,0301,0251|}" &
            "{AY;+05,0|}" &
            "{C|}" &
            "{PC000;0023,0056,05,1,J,00,B=EN: " & RFID & "|}" &
            "{PC001;0025,0093,05,1,J,00,B=LV:  " & LeakValueASCII & "|}" &
            "{PC002;0057,0137,1,1,J,00,B=STS: OK|}" &
            "{PC003;0024,0175,05,05,I,00,B=" & DateAndTime.DateString & "|}" &
            "{PC004;0023,0202,05,05,I,00,B=" & DateAndTime.TimeOfDay & "|}" &
            "{PC005;0025,0231,05,05,I,00,B=" & shift & "|}" &
            "{XB00;0168,0155,T,L,04,A,0,M2=" & RFID & ">M" & LeakValueASCII & "|}" &
            "{XS;I,0002,0002C4201|}"


            Dim ip As String = Lip
            Dim port As Integer = CInt(LPort)
            Try
                'Open Connection
                Dim client As New System.Net.Sockets.TcpClient

                client.Connect(ip, port)

                'Write ZPL String to Connection
                Dim writer As New System.IO.StreamWriter(client.GetStream())
                writer.Write(ToshibaStr)
                writer.Flush()

                'Close Connection
                writer.Close()
                client.Close()

This will work with raw ethernet without installing drivers..
The port was "9100"
Hope this helps....

29
Open Discussion / Re: using class with AdvancedHMI
« on: February 20, 2019, 11:21:57 PM »
Hey Archie,

Can u please help me modify this class of yours to work with Micrologix-1400 PLC.

30
Open Discussion / SQL Help
« on: December 26, 2018, 02:42:46 AM »
Hi,

I've used AHMI latest version with sql server 2014 express edition. i have total 4 AHMI SCADA running in 4 diffrent pc's. I've created tables in one of the 4 pc's and all AHMI's log data to that table.

Initially it worked fine but after some months data logging speed decreased drastically. I've cleared the tables to check if that increases the speed.

Can u help me with my problem or guide me to the right direction.

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