Jump to content

mr2fastva

Members
  • Posts

    2
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

LabVIEW Information

  • Version
    LabVIEW 2009
  • Since
    2003

mr2fastva's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. what is the correct method for using UDP communications in RT? i have deployed a simple test program to my CompactRIO, the Communications loops for a time-critical application using both the FPGA and the RT processor... the communications loops alone take 45% CPU and 60% memory, leaving little headroom for the actual time-critical decision-making code. here are what i've tried: try1: the incoming msg loop contained a UDP Read with infinite timeout. write shared variables upon reciept of UDP datagram (this was turned off)... outgoing msg strings put in queue of size 5. an infinite timeout Dequeue emptied this queue onto the UDP port. i preallocated all arrays and strings, and did any complex Cluster->String bit/byte packing outside the loop and just used Replace String Subset in the loop. later i figured the Cluster>>String stuff was eating processor so i made a *.conf file to contain the strings and just loaded them in. try2: incoming msg loop replaced with timed loop running at 25 ms, replaced UDP read with 1 ms timeout. replaced outgoing msg loop with timed loop at 25ms, replaced DeQueue with 1 ms timeout. i recieve messages at about 10 Hz (40 Hz in future), and send at about 20 Hz. all data is replace-previous, but i do examine a byte to determine which data to replace. i cannot use Shared Variables since I am implementing a robotics standard (JAUS, www.mr2fast.net/jaus) that uses UDP and TCP right now... this RIO application must communicate with 5 other Executables running on Linux and WIndows, developed by several organizations. other RT considerations i've made after reading NI.com guidelines for RT programming: - i've put my loops inside subVIs, eliminated subVIs where possible. - i preallocate strings of max length and the just use "Replace" - most of my VI terminals are "Required" so the VI doesnt have to check whether to use Default or not ive searched this on NI.com and LavaG without much luck. to my knowledge my app is broken into the two suggested loops "TimeCritical" and "Communications"... hopefully others have had the same problem. Thanks!!!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.