04-20-2010 07:00 AM
Hello,
I have used the AMC library as suggested in the 'Reference design for Real time test' in this thread. The problem I am facing is that when I send a message from target to host, it takes a really long time (4-5 seconds approx) to reach the host. My time deterministic loop on target runs at around 1 ms. Hence, this performance is not acceptable at all.
Is this kind of performance expected with the AMC library?
Thanks,
Aditya Changavalli
LabVIEW 2009
LV RT 9.0
04-20-2010 10:35 AM
Just to add to the above question, I did a few tests and the time taken for a message to reach the target from host is 10 ms approx while the time taken from host to target is 4500ms!!
I used the exact same VI design for both directions. Can someone please tell me why this is happening?
Aditya Changavalli
LabVIEW 2009
LV RT 9.0
04-20-2010 10:45 AM
Aditya,
I'm not sure why it's happening. We have not seen that problem here. Have you tried using any of the sample projects to see if they exhibit the symptoms that you are seeing?
-Nate
04-21-2010 03:22 AM
Hey Nate,
Thanks for replying. I am not sure where to find the sample AMC projects. I tried to use the examples that come with the library. But, I was facing some problems since I changed the type-def of the message (just removed the message attributes) as suggested in the AMC tutorial.
Besides, I tried to send just a simple UDP message (without AMC) across from Target to Host and its received almost instantaneously. I just cannot figure out where the delay is coming from!
Aditya Changavalli
04-21-2010 09:17 AM
Aditya,
The ones I am thinking of are the Reference Applications linked from the bottom of this page: A Reference Architecture for Local Machine Control
in the Machine Control Architecture Content diagram. Click on the "A Simple Machine Control Example".
You will also need to download and install a bunch of the other Reference Libraries.
-Nate
04-21-2010 09:51 AM
Nate,
I have already used the reference applications from this page: Reference Design for Real Time Test. This too had a bunch of other libraries. I modeled my use of AMC library exactly as given in this one.
I did some more test and the problem seems to come from the fact that my host computer has two network connections, while the target has one.
In fact, when I disable one network connection (not the one I connect to target), I stop getting any message from target. But when both are enabled, I get the same results:
Using AMC dispatcher
1. Host --> Target : 10 ms
2. Target --> Host : 4500 ms
Using standard UDP VIs (open, read and close) on host
Target --> Host : 10 ms
I am aware that the Open UDP VI (which is called inside the AMC dispatcher) has an input terminal to specify the network address. But the results don't change whether I wire the network address to it or leave it unwired.
I feel the critical issue is the presence of multiple network connections. Any idea what is the dependency of the AMC library in such cases?
Thanks,
Aditya
04-22-2010 08:40 AM
I used Wireshark to tap the network messages and the problem gets stranger still. Using AMC dispatcher, though I get the message from the target instantaneously, there are some "Name Query" over NBNS (NetBIOS) protocol. This causes an error "Destination Unreachable - Port unreachable" for the next 4500 ms. The AMC dispatcher does not stop executing till that time and hence does nto update the message received.
This problem is completely absent when I use UDP VIs. There are no NBNS queries and consequently no error messages. Hence, I get the message immediately.
For now, I got around the problem by disabling NetBIOS over TCP/IP in the WINS tab of advanced TCP/IP properties dialog box. I had to do this for both the network connections. Now, even AMC dispatcher gives instantaneous results.
What I don't understand however is why the AMC dispatcher is sending NBNS queries to the target? I could not find anything like that in its code.
Its particularly serious as I want to protect future users of my developed Real time VIs to be protected against such unpredictable behaviour. I might have to re-consider using AMC. Please help!!
- Aditya Changavalli
LabVIEW 2009
LV RT 9.0
04-22-2010 11:03 AM
Aditya,
Thank you for digging into this more and posting your results. I have not had a chance to test and reproduce this with a low level Ethetnet monitor, but I'm pretty sure that the NetBIOS call you see is initiated by the IP to String function in amc_Dispatch Read and Process UDP Messages.vi in the Dispatcher. This function is used to convert an IP address stored as a U32 to a string, either as Dot notation or as the name of the other device. For conversion to dot notation the function should not need to go out on the network, but it seems that it does. I will look into this more.
You can easily replace this function with a little LV code to do the conversion without this function and the associated network traffic.
04-23-2010 04:16 AM
Christian,
Thank you! It solves a big mystery, but it was fun trying to figure it out.
If it helps you, I have attached a screenshot of the trace monitored, along with the trace file (Wireshark format 'pcap').
Thanks again for the AMC Library. It works like a charm 🙂
Aditya
PS - The NetBIOS problem is there in other LabVIEW palettes too, as I found out with the FTP transfer VI. But now I know why!
12-01-2010 03:14 AM
Hi,
I am trying to install amc on my computer, but get the message "You must install LabVIEW 8.5 or later on the system before you can run this setup". I get the same message when I try to install some of the other required files, but not for all. I guess it maybe has to do with the fact that I have 64 bits LabVIEW (2010), because it worked when I had the 32 bits version. What should I do?