FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the speed of ethernet communications on an FP-2010?

I am running a program with 2 PID's on an FP-2010. The loop is running at 20ms. With a loop timer I have discovered that the loop can run in 16-17ms. I want to Publish 5 floats and 5 Integers. I also want to be able to read back 3 floats and 12 bools for control. When I add one Publish float, the loop timer goes up to 60ms. Can data be published faster than this? I really need a fast loop for the PID. I can go up to 25ms but no slower.
 
Any information or suggestions welcome.
Thanks,
 
0 Kudos
Message 1 of 7
(3,512 Views)

Is there a communications method faster than the datasocket that I am currently using? Can I get a better transfer rate over a serial port? Seems to me that serial might be light years faster than what I am seeing right now.

Chris

 

0 Kudos
Message 2 of 7
(3,505 Views)
Hi Chris,
 
You can create two loops to improve the PID loop rate and use RT FIFOs to transfer data between the loops.
  1. Time Critical Loop (TCL) with a higher priority to do your PID calculation and hardware I/O.
  2. Normal Priority Loop to handle communication to the host program

Below are some links with more information:

Regards,
Prashanth
0 Kudos
Message 3 of 7
(3,500 Views)

Thanks for all the great information! I will give it a try.

The only problem I can see is that I am running LV6.1. My customer does not want to upgrade at this time. Do you have any tips or special ideas for 6.1?

Chris

 

0 Kudos
Message 4 of 7
(3,498 Views)

Hi Chris,

Chapters 3 & 4 of the LabVIEW 6.0.3 user manual contains some suggestions for improving performance of RT code. http://digital.ni.com/manuals.nsf/websearch/A7A5E48C8C4F68E4862569EA006A6CF0.

Have a great weekend!

Regards,
Prashanth

0 Kudos
Message 5 of 7
(3,477 Views)

Thank you for the additional information.

The problem now is that the Time Critical loop is not properly preempting the low priority communication subvi's. My main time critical loop is set for 20ms and the code runs in approximately 17ms leaving about 3ms sleep time for the communications subvi. When I enable the communications subvi, the time critical loop runs haphazardly in any increment from 15 up to 60 or 70ms. I can increase the time critical loop to as much as 100ms with no improvements. At 100ms the variability is about +-20ms. I have tried setting my comm vi to both normal and background priority to no effect.

Any ideas that may improve the situation?

Best regards,

Chris  

0 Kudos
Message 6 of 7
(3,476 Views)

Hi Chris,

Are you passing your code through the communication wizard? The wizard will fragment your code into 3 parts: 1) Host vi that will run on your host computer 2) Normal Priority Loop vi that handles communication 3) Time Critical Loop vi that does your data I/O and time critical tasks. The Time critical vi is a sub vi of the Normal Priority vi.

Priority inversion can take place if you are using shared resources in more that one loop. So, precautions must be taken to handle these cases. Examples of shared resources in LabVIEW RT are:

Global Variables
Non-reentrant sub VIs
Real-Time Module Memory Manager
Semaphores
File I/O
Networking code

Chapter 5: Optimizing Applications – of the RT manual gives more information.

Organizing Inter-Thread Communication in LabVIEW Real-Time http://zone.ni.com/devzone/conceptd.nsf/webmain/f1fc2b8d7f5a0532862568eb0079d30d
0 Kudos
Message 7 of 7
(3,458 Views)