LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simplest TCP query of a cFP module?

I need a cFP-2120 to get data from modules on a cFP-1808.  What is the simplest method of using TCP to get data from a module on the cFP-1808?

Through all of my searches I have yet to find a single port number or explanation of how to setup the address.  Datasocket is far too slow for some reason.  UDP is a bad idea because of the loss.  I have not successfully setup a network variable (refer to this page).

cFP-1808
cFP-TC-120 is the first module
02 and 05 have thermocouples
192.168.1.166

Help getting this working is greatly appreciated.
0 Kudos
Message 1 of 7
(2,928 Views)
Hi Gizmaa,
you can choose the port number. Did you see the shipped TCP/IP examples. Use the example finder.
 
Hope it helps.
Mike
0 Kudos
Message 2 of 7
(2,906 Views)

For practically any other application I would agree but a cFP-1808 is an ethernet controller so all I can configure on it are the ethernet settings and module configurations (no port choices).  I will be using an embedded program on a cFP-2120 to grab sensor data from a cFP-1808.  Since there is no way to choose the port on a cFP-1808 how do I use TCP to get the data?

 

Am I suppose to add more than just the IP address to the address input?

0 Kudos
Message 3 of 7
(2,886 Views)

Hi Gizmaa,

 

The simplest way to read data from your cFP-1808 with your cFP-2120 is to simply use a FP Read.vi. Refer to the IP adress of the cFP-1808 in the FieldPoint IO Point In input and the cFP-2120 should read the data directly.


Hope this helps.

Regards,

Stephen S.

National Instruments
Applications Engineering
0 Kudos
Message 4 of 7
(2,866 Views)

Here is the latest attempt using the simple FP functions.  It turns on an LED on the host controller and a remote controller then turns them off after a minute.  The host's LED turns on but the remote LED doesn't.  What syntax does it expect if I were to use the IP address?

 

Host:  Mesocosm-05, 192.168.1.164

Remote:  Mesocosm-01, 192,168.1.160

0 Kudos
Message 5 of 7
(2,851 Views)

Hi Gizmaa,

 

I think I see what you are doing wrong. It looks like you are refering to the address of the cFP-1808 in the FieldPoint IO Point constant, but you are still using the module name for your cFP-2120.

 

I think this should fix it: First of all, if you haven't already, you will need to add your network module to your project. Do this by right clicking your .lvproj file in the Project Explorer window, going to New>>Targets and Devices...>>Existing target or device>>FieldPoint Network Modules, and selecting your cFP1808.

 

Then, when you click the dropdown arrow on your constant going into the FP Write or Read and click Browse..., you should be able to select the TC module under your cFP-1808 and choose the channel that you want.

 

Regards,

Stephen S.

National Instruments
Applications Engineering
0 Kudos
Message 6 of 7
(2,834 Views)

I have gone to trying to work between two cFP-2120's now.  The LEDs make for better feedback.  I did try adding the other FP to the project but that didn't work either. 

 

Seeing as this thread has gone from TCP to FP functions I should just refer any further posts to my other thread.  Thanks for the replies.

 

Other Thread

 

0 Kudos
Message 7 of 7
(2,830 Views)