LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RT Ethernet !!!

Hi, evry!

The problem is the following.
I have a system wich consists of Host (WinXP) and RT controller (8186). Every soft is 8.0-versioned. They're connected together in a "pair-to-pair" way (with cross-cable). The load on half-duplexed Ethernet is quite heavy sometimes.
And, sometimes the connection gets lost at all (ping of my RT controller is no use), while local 127.0.0.1 pings OK. And after that the only way to wake system up is to reboot RT controller :(.

How can I get rid of this kind of RT Ethernet behaviour?

Thanx in advance!
0 Kudos
Message 1 of 10
(10,132 Views)
So, what is generating all that traffic? I assume you have full control over the LabVIEW code on both ends.
 
First of all, why are you using half-duplex? A direct connection should have no problems with full duplex.
 
Maybe your cable is faulty and all that traffic is due to retransmissions:
  1. Could it be you're having a duplex mismatch (one side half, other side full).
  2. Have you tried a different cable? How long is the cable?
  3. Is it a commercial cable or did somebody do the crimping locally?
  4. An incorrectly wired cable (e.g. split pairs) will test OK on a cheap DC based tester, but will be unreliable or fail at ethernet speeds.
Then there is the possibility of a faulty ethernet card. Are the connectors clean and without any bent pins?

Message Edited by altenbach on 12-24-2006 09:00 AM

0 Kudos
Message 2 of 10
(10,121 Views)

RT nodes will stop responding when they run out of memory or CPU.

Monitor both before the comm faliure and address as dicated.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 10
(10,116 Views)
Well, thanx a lot, guys.

Really the first point coming to my mind - cable problems. It is firmware cross-connection 5 meters of twisted pair - so it should be properly made. But the way it is layed out...
You know, the thing is that almost anyone from personnel - even room servicer 🙂 - has an ability to "resink" it the way they want and... they are not much enthusiastic about engineering etc., you know they just users ;). That's the way.

For me it is important just to make the system not to hang up. I'd certainly try out full duplex - but the next sending of data could not be initialised without all the previous data exchange completed - it is controlled by a program.

So...Suppose noise is the key...
But why does RT TCP/IP not to just "wait a while" instead of stop working at all - that's what I'm concerned 'bout.

And.. I stumbled upon "Halt System If TCP/IP fails" flag in MAX in RT configuration. May be smth about it is the key?

Again, thank you for your attention!
0 Kudos
Message 4 of 10
(10,091 Views)


@Sharonoff wrote:

But why does RT TCP/IP not to just "wait a while" instead of stop working at all...

Ben suggested an answer for that - you have memory consumption problems and that's what causing the controller to hang, not the communication itself. As he suggested, you should monitor the memory usage and see if it goes up.
The most common culprits for uncontrolled memory consumption are Build Array and Concatenate String which are called in a loop. If you have that, you should preallocate your buffer and do a replace inside the loop.

Also, if your RT device has a LED on it, you could set your program to blink it regularly and if it stops you know that the program is stuck.

I'm not sure what the check box in MAX you mentioned does, but that does sound a bit like what you're describing, although something which completely stops an RT program without any control sounds like a very BAD idea to me - a watchdog is a more common and elegant way of handling this and you can configure network watchdogs in MAX and in your code. I suggest you read the help for it to see exactly what it does.


___________________
Try to take over the world!
0 Kudos
Message 5 of 10
(10,079 Views)
The option in MAX, is AFAIK to prevent to run a system that misses some vital part (a controller or something)

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 6 of 10
(10,064 Views)
Hi again, guys!!!
First, thanks everybody for suggestions above.

And...Finally, I managed to make some research on system's CPU and memory consumption, as been suggested.

The results are in picture attached.

... off course, the shots were done during the biggest consumption of system resources. During the time left the load is about 15% - 25% (CPU).

As you see, average load is between 20% and 70% (CPU) with some overload peaks.

Can I suppose this to be the reason for preventing Ethernet (or NIC, or RT OS or smth about) from normal functioning?

Thanks alot in advance!!!
0 Kudos
Message 7 of 10
(9,206 Views)

Please tell us more about what is causing the spikes in CPU and if they corelate to the isues you are seing.

Curious,

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 10
(9,039 Views)
Well, Ben, just look in, please, to the following discussion:

http://forums.ni.com/ni/board/message?board.id=110&message.id=5163&query.id=176096#M5163

And thank you for attention!
0 Kudos
Message 9 of 10
(9,011 Views)

>> And.. I stumbled upon "Halt System If TCP/IP fails" flag in MAX in RT configuration.

 

The "Halt System if TCP/IP Fails" is only evaluated on boot - this should probably be called, "If attempts to get an IP address via DHCP fail, halt and reboot the system to try again."  This way with the checkbox set you are guaranteed that if an IP Address cannot be obtained the system will keep rebooting and keep trying.  If the box is not checked, and you're using LabVIEW Real-Time 8.6 or better, you might get an AutoIP address and thus the system may not be addressable outside the local subnet (which could be bad if you don't have local access to the system).

0 Kudos
Message 10 of 10
(2,771 Views)