11-30-2005 07:26 PM
12-01-2005 01:03 AM
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
12-01-2005 09:19 AM
Below are some links with more information:
12-01-2005 10:27 AM
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
12-03-2005 03:59 PM
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
12-03-2005 06:10 PM
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
12-05-2005 12:13 PM
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
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