Jump to content

My Real-time Experiences


JackHamilton

Recommended Posts

Jack, welcome to the wacky world of real-time. I have programmed several real-time applications using PXI and Fieldpoint so I know exactly what you're going through. Your post is so timely for me since I am right in the middle of another RT system and have my own recent gripes. I didn't realize how much of a paradigm shift I had to make from standard LabVIEW coding practices. My first RT project was under quoted by about five-fold. Needless to say, I lost money on that first one. :2cents:

Any VI written to be run in/on real-time must be coded with this intent ground-up. You
Link to comment
  • 2 weeks later...

I am interested in your TCPIP appraisal under RT. We've done several RT applications both on PXI and RT and have used TCPIP for all comms. We've written our own server that runs on the RT just fine. Maybe we've missed the point here or you guys approach it differently to us, but TCPIP under RT was fine.

However I must admit that our most of our applications are embedded not RT'ed and if you RT them you need to make allowance for "extra" time just as you would under a windows PC. If you set the deterministic loop really tight, then there are no spare cycles for the comms loop (low priority). ie the OS preempts the comms and never serves it. Similarly this is the case for the DS connection too. However I have achieved a 125Hz (from memory), RT app communicating to a DS server and never missed any data points.

Michael, I'd like to know how you're using VI server to get around the problems.

cheers, Alex.

Link to comment
  • 2 weeks later...
  • 4 weeks later...

Sorry Jack, didn't mean to imply that you were complaining. I am interested in the RT stuff as a general platform for embedded programs and I know that some of you guys do things way better than I could. I am interested in finding out the best methods for comms (ie if there are better ways than setting up your own server, etc).

BTW has anyone played much with the LabVIEW 7 RT Express communications stuff. Does this give more flexibility?

cheers, Alex.

Link to comment

As someone who will probably end up doing some stuff with Compact Fieldpoint at some point, the mention a few posts back of VI Server got me interested. Can you just open a reference to a VI running on a Fieldpoint controller and set/read controls and indicators? If those terms have any meaning since there's no display so no point in there being any form of front panel once a VI is sent to the controller.

Can you also use VI Server to push a new sub-VI down to the controller whilst the system's running, to do things like calling by reference?

Link to comment

Craig,

That may work, But I take the position of 'Fear' :( and would program TCP/IP command capability to your routines. You can instigate command the data requests in a controlled manner.

I'm not a Real-Time Power user by any means, but some of these nifty 'features' can have unintended consequences.

Regards

Jack Hamilton

Link to comment

Hello RT and TCP fans. I am currently working on an RT system and I had to create a custom TCP server. I decided to make it very general and allow registering call-back VIs to handle client connection. This design allows for multiple client connections and is super-clean :thumbup: . The call-back framework handles all the management (spawing and cleanup). Please take a look and feel free to comment and discuss in the forum (see hyperlink, below).

:!: My only disclaimer is that I've only spent a couple days on it and it has not been tested for memory leaks, reliability, etc. Please report these back to me, if you would be so kind.

Example - TCP Server, An OpenGOOP TCP Server

Cheers,

-Jim

Link to comment
  • 1 year later...

Hi Guys

Just wanted to add my 2 cents worth! I am busy developing code for a FieldPoint Rt controller, and found DataSocket too slow, TCP too much hassle, and so settled on UDP to communicate between the Host PC and the RT module. Works very well.

Also, as I'm programming in LV6.1, to pass data between the core & comms loops in th RT software, I used an ODM (Object Data Manager), which is simply a non-running While Loop with a shift register and a case statement to Set & Get the required data.

Btw, I use complex clusters for all data communication and transfer.

Thanks for a fantatsic site!

Regards Deon.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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