Link to home
Create AccountLog in
.NET Programming

.NET Programming

--

Questions

--

Followers

Top Experts

Avatar of deepu Lovelesh
deepu Lovelesh🇮🇳

TCP IP COMMUNICATION USING VB.NET
I HAVE A HAEMTALOGY ANALYZER WITH RJ45 PORT. I NEED TO RECEIVE DATA FROM THAT MACHINE TO MY VB.NET PROGRAM. KINDLY SHARE THE CODE FOR THE SAME SO THAT I CAN GET THE DATA AND RESTRUCTURE THE SAME AS PER MY REQUIREMENT.

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of Steve WilliamsSteve Williams🇺🇸

What types data are you trying to receive? Have you checked with the equipment manufacturer to see if they have an SDK for this?

Avatar of deepu Loveleshdeepu Lovelesh🇮🇳

ASKER

Yes the equipment manufacturer is having the sdk for this and communication is possible. but i need the code where to receive the raw data.

Avatar of Steve WilliamsSteve Williams🇺🇸

@deepu Lovelesh

The SDK is how you write the code to receive the data. With the SDK there are probably examples for your hardware. I know SDK's are not all free but if it is necessary for your business, it is a cost we all have to pay. Our company recently has been diving into auotmating processes and we have purchased many SDK's to acheive our goals, the end rsult so far has been well worth the cost.

 If you are not knowledgeable in coding or into developpement, my advice would be to find a person who is and have them explain the ins and outs on how this will happen.  Not all SDK  API's are the same. Each one is different and has to be reviewed before anyone can show you the code for your peticular application. It would be like trying to write a novel with out knowing the charachters or the plot. No one will know what the code is before reviewing the API.

Good Luck, hope this helps!

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of deepu Loveleshdeepu Lovelesh🇮🇳

ASKER

Dear Steve

I just need to get the raw data only
after that i ll program everything myself.

Avatar of Steve WilliamsSteve Williams🇺🇸

@deepu Lovelesh

What you may want to do is purchase Anarduino Uno and use this to capture the raw data and then you can write your application to receive the data in whatever format you need from the uno.  You can get a good unit for around $20. I use one to read raw data from a temp sensor and it relays the data back to my windows application through a USB port. Very handy item. I'm sure you could find someone with a similar project that may have a pinout from an RJ45 cable to your device.

Arduino has a great support forum and API. Lots of great information in the Arduino community.

Just an idea, roll it around a bit and let , me know what you think.

Avatar of deepu Loveleshdeepu Lovelesh🇮🇳

ASKER

i just need to receive the data from a specific ipaddress on a specific port. my application not able to receive. please help

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of Steve WilliamsSteve Williams🇺🇸

@deepu Lovelesh

I guess I need to know more information in order to help you. How are you connecting this to the computer? You said "from a specific IPaddress through a specific port. ", yet you have not told us what the port is or the ip is. What code language are you writing this in? Your question is too vauge for anyone to answer. You need to supply us with any informtion that you have so that we can help. No one will answer you until you describe the requirement in better detail.

Avatar of deepu Loveleshdeepu Lovelesh🇮🇳

ASKER

i had a haematology analyzer on network having ipaddress as 192.168.2.6 and my laptop having ipaddress as 192.168.2.4 and willing to receive data on port no 3600. i am using vb.net only

Avatar of Steve WilliamsSteve Williams🇺🇸

How are these connecting through the network? Is the patch cable a straight through or crossover cable? Brand , model number of analyzer?

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of deepu Loveleshdeepu Lovelesh🇮🇳

ASKER

Sir thanks a ton for our interest. i am able to get the data but there is some data which represents a linear graph. can you help me to find out the solution to that using vb.net.

the data received for the graph is as under

"OBX|32|ED|15000^WBC Histogram. Binary^99MRC||^Application^Octer-stream^Base64^AAAAAAAAAAAAAAABAgQHDRcmO1Z3nMPg9P/98+HKsZl8aFdGMyUfHBwcHR8iJy02QUpLTU5PT09PTUxKSEZEQkBAPz4+PT09Pj49PDo5ODg3Nzg6PD5AQ0ZISUpMTU9RU1VWWFlZWlpaWlpaWlpbW1tbW1tcXV5fYGBhYWBgXl1bWVdVU1JQT01MSkhGREJAPj07OTg2NDMxLy0sKignJSQi"

or
"OBX|36|NM|15057^RBC Histogram. Total^99MRC||43822||||||F
OBX|37|ED|15050^RBC Histogram. Binary^99MRC||^Application^Octer-stream^Base64^AAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAgIDAwUGCg4TGiIuOklYaX2OoLHD1OLu+P3//vny593Sw7Snmo1/dWthWFBJQjw2Mi8sKSclIyIgHx4cHBoaGBcWFBQTExISERAQEA8PDw4MDAsKCgoJCAgIBwcGBwcGBgYGBQQEBAQDBAMDAwMDAgICAgICAgEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==||||||F"

or

"OBX|42|ED|15100^PLT Histogram. Binary^99MRC||^Application^Octer-stream^Base64^HR0MHQwMFB0VDAsMDxQiHRoVEAwLCwsMDg8QFBoiLB0cGhcVEhAODAsLCwsLCwwMDQ4ODw8QEhQXGh4iJywzHRwcGxoZFxYVFBIREA8ODQwMCwsLCwsLCwsLCwsLDAwMDA0NDg4ODw8PDxAQERITFBYXGRocHiAiJCcpLDAzOB0=||||||F
"


would really be thankful if you could help to create a graph from above sequence.

Avatar of Steve WilliamsSteve Williams🇺🇸

I have attached a user manual for an analyzer I found online. I believe this is similar to the one you are working on. Am I correct?
371721735-BC-5800-LIS-Protocol-Manua.pdf

Avatar of deepu Loveleshdeepu Lovelesh🇮🇳

ASKER

thanks a ton Steve but now i need the program that converts the base64 octal values given above to the linear graph. can you please help in that.

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of Steve WilliamsSteve Williams🇺🇸

@ deepu Lovelesh
give a couple days to work on this. I believe what your actually trying to do is decode the Base64 to octal values.

Here is an online convertor which shows the output I'm working on for you in vb.net.
User generated image

Avatar of deepu Loveleshdeepu Lovelesh🇮🇳

ASKER

Dear Steve

I need a graph from this which would look somehow like this.

so request you to kindly workout for that

"OBX|32|ED|15000^WBC Histogram. Binary^99MRC||^Application^Octer-stream^Base64^AAAAAAAAAAAAAAABAgQHDRcmO1Z3nMPg9P/98+HKsZl8aFdGMyUfHBwcHR8iJy02QUpLTU5PT09PTUxKSEZEQkBAPz4+PT09Pj49PDo5ODg3Nzg6PD5AQ0ZISUpMTU9RU1VWWFlZWlpaWlpaWlpbW1tbW1tcXV5fYGBhYWBgXl1bWVdVU1JQT01MSkhGREJAPj07OTg2NDMxLy0sKignJSQi"

it already tells that histograms are octer stream base64 strings in the first line.
IMG-20181110-WA0000.jpg

Avatar of Steve WilliamsSteve Williams🇺🇸

@deepu Lovelesh

Ok I here is a link to download the sample vb.net project I created in MSVS 2017 community.

Click Here to download the project from my google drive.

Here is a screenshot of the form with the encoded data that has been decoded and shown in a decoded text field.
User generated image

and here is a screenshot of the application in debug mode and viewing the contents of the datatable that contains the data harvested from the textbox string.

User generated image
and finally here is the code from the form

Imports System.Environment
Imports System.IO
Imports System
Imports System.Text
Imports System.Data
Imports System.Windows.Forms.DataVisualization.Charting


Public Class FrmMain

    Public dt As New DataTable("TheData")

    Private Sub btnGo_Click(sender As Object, e As EventArgs) Handles btnGo.Click
        Dim base64Encoded As String = txtEncoded.Text
        Dim data() As Byte

        'What you care about
        data = System.Convert.FromBase64String(base64Encoded)

        For i As Byte = LBound(data) To UBound(data)
            txtDecoded.Text += " " + Convert.ToString(data(i))
        Next

        Dim dText As String
        dText = txtDecoded.Text

        Dim ds As New DataSet()

        dt.Columns.Add("data")
        Dim nums As String() = dText.Split(New Char() {" "c})
        Dim num As String
        For Each num In nums
            dt.Rows.Add(num)
        Next

        chData.DataSource = dt
    End Sub
End Class

Open in new window


I apologize but I don't have any more time to spend on this as I was just handed a huge project and won't have the time. Hope what I did for you will get you pointed in the right direction and help you reach your goal. Good luck.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


ASKER CERTIFIED SOLUTION
Avatar of deepu Loveleshdeepu Lovelesh🇮🇳

ASKER

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of Steve WilliamsSteve Williams🇺🇸

Thats good news deepu, glad you found what you needed.
.NET Programming

.NET Programming

--

Questions

--

Followers

Top Experts

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.