tag:blogger.com,1999:blog-7216011964698353019.post5642480292268229051..comments2024-02-11T23:13:05.335-08:00Comments on HadiSCADA: Modbus TCP Sample VB (English version)Unknownnoreply@blogger.comBlogger31125tag:blogger.com,1999:blog-7216011964698353019.post-14836180455931660112022-10-30T06:46:45.681-07:002022-10-30T06:46:45.681-07:00hello, i think you read at the wrong address, plea...hello, i think you read at the wrong address, please check from the datasheet of your device.Hadi Scadahttps://www.blogger.com/profile/02307548620019314115noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-17239486295300376992022-07-07T04:57:47.794-07:002022-07-07T04:57:47.794-07:00I want use this applcation to reed data from gqpr...I want use this applcation to reed data from gqpr modem. I can connect with modbus tcp but ı cant read anything. what ı should do?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-21768581494027140702022-01-19T09:20:40.230-08:002022-01-19T09:20:40.230-08:00please see this :
http://hadiscada.blogspot.com/20...please see this :<br />http://hadiscada.blogspot.com/2021/08/sharing-sourcecode-modbus-float.html <br /><br />its in C#, but you can learn and try to convert to VB.Hadi Scadahttps://www.blogger.com/profile/02307548620019314115noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-81212115512627636402022-01-19T09:17:27.901-08:002022-01-19T09:17:27.901-08:00sudah sy reply di artikel yg lain ya mas.sudah sy reply di artikel yg lain ya mas.Hadi Scadahttps://www.blogger.com/profile/02307548620019314115noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-32667339044063531012021-10-25T00:23:14.229-07:002021-10-25T00:23:14.229-07:00Untuk mengambil angka tertentu dari sebuah PLC kon...Untuk mengambil angka tertentu dari sebuah PLC konsep dasarnya spt apa Pak? Di manual yang saya miliki structurnya spt ini : <br />Address(byte) Function Code (Byte) data (n byte) dan CRC (2 bytes). Model komunikasinya modbus TCP/IP. Ketika saya menggunakan aplikasi yang Bapak buat, terus koneksi ke IP addressnya sudah berhasil. Namun di aplikasi tsb kan kita diminta untuk memasukkan unit,start address dan size. Lalu pertanyaannya adalah bagaimana cara saya menentukan unit,start address dan size tsb Pak? Karena saya masih bingung ketika membaca manual dari PLC tsb. yadisharehttps://www.blogger.com/profile/12369068818831057361noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-17584317360257937682021-10-21T10:57:33.023-07:002021-10-21T10:57:33.023-07:00i just forgot the unit-ID...
is there a way to sh...i just forgot the unit-ID...<br /><br />is there a way to show the values as floating?!Anonymoushttps://www.blogger.com/profile/00683082157098071048noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-1314288973505372312021-09-30T05:36:30.039-07:002021-09-30T05:36:30.039-07:00Sorry, but have you ever tried a real modbus conne...Sorry, but have you ever tried a real modbus connection?<br />In my case it doesn't work. I can connect to the address via port 502, but I can't read anything.Anonymoushttps://www.blogger.com/profile/00683082157098071048noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-34086788972211216832020-03-26T16:17:27.844-07:002020-03-26T16:17:27.844-07:00thank you very muchthank you very muchHadi Scadahttps://www.blogger.com/profile/02307548620019314115noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-43553233285198267882020-03-03T12:18:37.434-08:002020-03-03T12:18:37.434-08:00nice code and thank you for sharing. i notice that...nice code and thank you for sharing. i notice that Modbus_Sample_VB crashes when switching to char. so i modified it slightly as follows...<br /><br />[modification of ShowAs()]:<br /><br /> If radChar.Checked Then<br /> 'If x <= _char.GetUpperBound(0) Then<br /> ' ctrl.Text = _char(x).ToString()<br /> ' ctrl.Visible = True<br /> 'Else<br /> ' ctrl.Text = ""<br /> 'End If<br /> If x <= data.GetUpperBound(0) Then<br /> If (data(x) >= 32) And (data(x) <= 122) Then<br /> ctrl.Text = "'" + Chr(data(x)).ToString() + "'"<br /> Else<br /> ctrl.Text = "<" + data(x).ToString + ">"<br /> End If<br /> ctrl.Text = ctrl.Text + " " + hex_byte(data(x))<br /> ctrl.Visible = True<br /> Else<br /> ctrl.Text = ""<br /> End If<br /> End If<br /><br />[new function added for hex display]:<br /><br /> Private Function hex_byte(ByVal n As Integer) As String<br /> Dim h As String = "0x"<br /> Dim ones As Integer = n And 15<br /> Dim tens As Integer = (n - ones) / 16<br /> h = h + Hex(tens) + Hex(ones)<br /> Return h<br /> End FunctionAnonymoushttps://www.blogger.com/profile/04073748574166188281noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-41046965951481982322020-01-07T16:45:41.513-08:002020-01-07T16:45:41.513-08:00please refer to the newer project.
Thanks.please refer to the newer project.<br />Thanks.Hadi Scadahttps://www.blogger.com/profile/02307548620019314115noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-54956158683697309312019-10-04T21:45:10.253-07:002019-10-04T21:45:10.253-07:00yourstm12@gmail.comyourstm12@gmail.commanish12https://www.blogger.com/profile/01680689493064897903noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-36407355053761124242019-10-04T21:44:44.396-07:002019-10-04T21:44:44.396-07:00it happens there data is not result of command ,
r...it happens there data is not result of command ,<br />refer the showas function <br />you can get it byte by byte , and also in delayed ways<br />i mean it is little bit dificult but not immposiable <br /><br />ref below code for reading holding reg only <br />in showas function<br /><br />If radBytes.Checked Then<br /> If x <= data.GetUpperBound(0) Then<br /> ctrl.Text = data(x).ToString()<br /> tmRichTextBox5.AppendText(Convert.ToChar(data(x)))<br /> ctrl.Visible = True<br /> Else<br /> ctrl.Text = ""<br /> End If<br /><br />manish12https://www.blogger.com/profile/01680689493064897903noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-34142958901435463582019-10-03T05:49:39.673-07:002019-10-03T05:49:39.673-07:00first all thanks for code ,
sir , i am tring to r...first all thanks for code , <br />sir , i am tring to read the some values from holding reg<br />and tries to display it in some text box ,<br />i am ref your code under button read holding reg,<br />but to display the data on text box , i am not finding the <br />variable from which i can read it , like data <br />please help in this regard <br /><br />output values i needed to display , in your code it is in data <br /><br />MBmaster.ReadHoldingRegister(IDr, unitr, StartAddressr, Lengthr)manish12https://www.blogger.com/profile/01680689493064897903noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-35346675198051263022019-09-19T16:30:35.992-07:002019-09-19T16:30:35.992-07:00Dim value As UInt16
value = 1000
Dim values(1) As...Dim value As UInt16<br />value = 1000 <br />Dim values(1) As Byte<br />values = BitConverter.GetBytes(value)<br />If (BitConverter.IsLittleEndian) Then Array.Reverse(values)<br />MBmaster.WriteSingleRegister(ID, unit, 54, values) Hadi Scadahttps://www.blogger.com/profile/02307548620019314115noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-88891741397368263112019-09-12T04:56:47.001-07:002019-09-12T04:56:47.001-07:00Hi,
I have little experience with VB.NET.
I need t...Hi,<br />I have little experience with VB.NET.<br />I need to do an "MBmaster.WriteSingleRegister (ID, unit, StartAddress, data)"<br />data from a textbox without using GetData. Example: write 1000 at address 4055. Can you help me?Marcos Souzahttps://www.blogger.com/profile/06253065257057248084noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-47205054995628426392019-07-12T06:57:18.191-07:002019-07-12T06:57:18.191-07:00great. thanks.. great. thanks.. Hadi Scadahttps://www.blogger.com/profile/02307548620019314115noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-20342916144165721792019-07-07T23:01:46.675-07:002019-07-07T23:01:46.675-07:00Sorry , now that was solve
Thank you
code is b...Sorry , now that was solve <br /><br />Thank you <br /><br />code is below : <br /> word(x \ 2) = data(x) * 256 + data(x + 1)<br /> Dim unsigned As UInt16 = word(x \ 2)<br /> word(x \ 2) = CShort(Val("&H" & Hex(unsigned)))<br /><br /> x = x + 2<br />MODULATER SERVICEShttps://www.blogger.com/profile/15587102713451081709noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-52323016802627981782019-07-07T22:18:49.640-07:002019-07-07T22:18:49.640-07:00This comment has been removed by the author.MODULATER SERVICEShttps://www.blogger.com/profile/15587102713451081709noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-15007785185851898072019-07-07T22:16:04.793-07:002019-07-07T22:16:04.793-07:00hi
Very good code, now today i face a bug in negat...hi<br />Very good code, now today i face a bug in negative value there was register data value = -2 but in software word = 65534 show ! <br /><br />Please help me , if all of you solve that ! MODULATER SERVICEShttps://www.blogger.com/profile/15587102713451081709noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-30749847966751411172019-06-18T00:19:30.777-07:002019-06-18T00:19:30.777-07:00Thank you very much , its very use full for meThank you very much , its very use full for meMODULATER SERVICEShttps://www.blogger.com/profile/15587102713451081709noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-5720120857067763662019-04-25T06:23:54.400-07:002019-04-25T06:23:54.400-07:00thanks.. thanks.. Hadi Scadahttps://www.blogger.com/profile/02307548620019314115noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-85589283677389046402019-04-01T07:03:10.801-07:002019-04-01T07:03:10.801-07:00Hi
Great Job, I am using your code for a Vb.net p...Hi <br />Great Job, I am using your code for a Vb.net project, so far so good will revert if any clarification or bugs found Mahesh Prasath J.Rhttps://www.blogger.com/profile/12995650630883629417noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-87401671432239727392017-09-06T19:01:25.431-07:002017-09-06T19:01:25.431-07:00Hello,
sorry, i dont know about Moscad protocol.Hello,<br />sorry, i dont know about Moscad protocol.Hadi Scadahttps://www.blogger.com/profile/02307548620019314115noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-56771831659461522902017-08-14T04:12:30.398-07:002017-08-14T04:12:30.398-07:00hello , Can i read rtu over ip gateway? Moscad pro...hello , Can i read rtu over ip gateway? Moscad protocolKripto Para Koleksiyonuhttps://www.blogger.com/profile/14510613804432432536noreply@blogger.comtag:blogger.com,1999:blog-7216011964698353019.post-65916117927198062932017-05-23T00:31:09.790-07:002017-05-23T00:31:09.790-07:00Top job - great code!!!Top job - great code!!!Anonymousnoreply@blogger.com