LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[Ethernet TCP/IP] Recover data from sensor - KIMO C310

Solved!
Go to solution

Hello everyone, 

 

My goal is simple: recovering sensor's data (Delta-P) from a device: KIMO C310 (see pictures).

 

This is the first step of a project (regulation).

 

I am trying to use the option of the device, as said in the datasheet, "TCP/IP" protocol. Since I am a beginner in LabVIEW (student), I read online articles to achieve my goal. And I am stuck on errors and difficulties to understand :

 

I am using the example "TCP-Client" vi given by the LabVIEW library.

 

The connection is done through an Ethernet cable RJ45.

 

If you have any idea, any help at all would be very appreciated.

 

Here is what I understood : 

The "client" is supposed to be me: the final receiver of the data. The "server" is the data generator/sender: here, the C310.

The function to open TCP communication should be sync (same port) as the C310. 

 

I read that it might be because of Firewall issues, which I de-activated for the test, but I keep having the same issue.

 

Let me know if you need any information.

Thank you!

Download All
0 Kudos
Message 1 of 22
(579 Views)

I think the problem is with your IP address.  Your device has it set to 127.000.000.001.  That is an odd way of writing it, but I'll assume that it actually resolves to 127.0.0.1.

 

What is the IP address of the PC you are running your VI on?

 

The issue with 127.0.0.1 is that it is a loopback address.  So if you use that on a PC, no matter what address it is, the PC will try to open a port on itself.  The same way as if you had used "localhost".

 

Read the manual for your device.  Make sure it uses an IP that is on the same subnet as your PC, whether that is statically assigned or given to it by a DHCP server on your network.

Message 2 of 22
(562 Views)

Thank you very much for this information! 

 

So: IP address of the computer : 

169.254.197.62

(see attached).

 

I can actually manually modify the IP address of my device. what should I write? 

 

You said, "is on the same subnet as your PC". Can you enlight me on what does that mean?

 

Edit: Also, the datasheet does not help, it just says that communication is possible through TCP/IP... there is nothing such as "help" towards such an application.

 

Again, Thank you ! and Have great vacations / First of the year / Xmas times! 

 

Edit: Forgot to add the screenshot.

0 Kudos
Message 3 of 22
(538 Views)

Hi Benny,

 

please read Wikipedia about IP addresses in the range of 169.254.0.0-169.254.255.255 (or google for other websites): those IP addresses are used for "zero configuration", when no other server is providing IP addresses to devices.

 

Set the IP address of your computer to 192.168.2.2 and that KIMO to 192.168.2.3 when you want to connect both with just a short LAN cable…

Best regards,
GerdW


using LV2020 on Win8.1+cRIO
Message 4 of 22
(526 Views)

Hello 

 

Thank you for the help, 

 

I went to read about the usable IP address range

https://www.auvik.com/franklyit/blog/special-ip-address-ranges/#:~:text=0.0%20%E2%80%93%20169.254.,g....

I do understand a little better. 

 

So, I'm so sorry to bother you again, but when you say to input the IP address to the computer, you mean the IP settings of the LAN ethernet on Windows right and the IP on LabVIEW (Both... right ?)

 

If yes, I get that the subnet mask should be 255.255.255.0, which makes the subnet prefix length 24, and since it's a LAN, there is no gateway nor DNS servers... right? 

 

If you got a good video or something for a relative beginner I would greatly appreciate it.

 

Also, Since English is not my main language, here is an apology for my very probable mistakes ^^'

 

Best Regards

0 Kudos
Message 5 of 22
(515 Views)

Hi Benny,

 


@Benny360 wrote:

So, I'm so sorry to bother you again, but when you say to input the IP address to the computer, you mean the IP settings of the LAN ethernet on Windows right and the IP on LabVIEW (Both... right ?)

If yes, I get that the subnet mask should be 255.255.255.0, which makes the subnet prefix length 24, and since it's a LAN, there is no gateway nor DNS servers... right? 


Yes, I meant to set a static IP address for the LAN port on your computer using the Windows network settings as shown in your image. The subnet mask should be 255.255.255.0. And you don't need a gateway or DNS for connecting two devices directly by a LAN cable.

Best regards,
GerdW


using LV2020 on Win8.1+cRIO
Message 6 of 22
(494 Views)

Hello GerdW, 

 

Do Windows say that the settings can't be saved, any idea what I'm missing?

(see attached)

 

Thank you, 

Best regards.

0 Kudos
Message 7 of 22
(491 Views)

Hi Benny,

 


@Benny360 wrote:

Do Windows say that the settings can't be saved, any idea what I'm missing?


I don't have Win10 at hand to check this dialog on my own.

And my French is quite rusty, but I guess you need to set a valid address mask of "255.255.255.0" instead of just "24"…

Best regards,
GerdW


using LV2020 on Win8.1+cRIO
Message 8 of 22
(487 Views)

Hey, 

 

So, I set the Gateway to 127.0.0.1 and it saved it. 

 

So : 

192.168.2.2 as Ip

24 for the subnet mask length which makes the mask be 255.255.255.0

and 127.0.0.1 for Gateway.

 

Launched Labview, input 192.168.2.3, and error 56 occurred, it seems like a Timeout? 

see attached.

 

Best Regards

0 Kudos
Message 9 of 22
(481 Views)

Hi Benny,

 

is your KIMO device already set to 192.168.2.3 and connected to your computer? Does Windows indicated a connected device for this LAN port?

Can you ping the device using the Windows cmd shell or PowerShell?

Best regards,
GerdW


using LV2020 on Win8.1+cRIO
0 Kudos
Message 10 of 22
(477 Views)