07-27-2009 05:20 PM
Hi!
I have BF-537 EZ-KIT Lite and I'm trying to create a simple server in it. I found following problem: TCP listener does not honor timeout: it waits until client makes connection forever (regardless timeout value). Same happens to "UDP read". Moreover these VIs completely block the execution so the parallel loop is stuck as well. I found workaround: if you wrap while loops in Timed Loop they all run in parallel; the connection listener is still stuck and waits forever, but other loops execute.
Is it expected behavior? Any suggestions to fight it?
Thanks!
Solved! Go to Solution.
07-28-2009 03:57 PM
azukov,
Could you post your code so that we could take a look for you?
07-28-2009 05:29 PM
Please find attached zipped project demonstarting my problem.
There are 2 VIs for TCP and UDP cases.
Both should work the same way: LEDs start blinking at 10 Hz rate. Instead it freezes and waits for connection forever. Once connection is made (by browser in TCP case and standard UDP-sender in UDP case) all loops execute and then they freeze again until next connection is made.
Thank you,
Alexander Zhukov
07-31-2009 09:11 AM
Alexander,
The project is looking for BF537_LED_PrjAttr.ctl. Do you have this?
07-31-2009 09:35 AM
This is a standard file from LV distribution
Here is the path to it:
C:\Program Files\National Instruments\LabVIEW 8.6\Targets\ADI\Embedded\vdk\eio\BF537\BF537_LED_PrjAttr.ctl
I also attached the file itself.
Thanks!
08-03-2009 09:18 AM
Alexander,
I was also not able to get your project up and running. I am trying to adapt the architecture used in the shipping example called "TCP.lvproj" in the ARM>>Keil>>Protocol Drivers folder of Example Finder (mine is in the Toolkits and Modules folder but yours might be in the Toolkits and Modules Not Installed folder) for the client/server architecture and add in LED support using the shipping example called "BF537 LED Test.lvproj" in the Blackfin>>Fundamentals folder as a basis. You might want to also look at these as guidance. I didn't notice anything off-hand that is going wrong with your code but I am still looking into it.
08-03-2009 11:57 AM
Grant,
Did you try to "wake up" loops with a remote connection? The code is actually running but blocking execution until connection is made. Once a connecton is made the LEDs will blink and freeze again waiting for next connection.
Thanks,
Alexander
08-04-2009 10:41 AM
Alexander,
I used the UDP Sender to "wake up" the LED loop, but no LEDs ever flashed. Are you seeing LED 1 and 2 blink continously and LED 6 just blink once (and you want to see it everytime you run UDP Sender)? I'm just not able to replicate the issue with my EZ-537 kit and your code. Are there any other settings (jumpers, port considerations, etc.) that I could be missing? I believe that you are having this issue but I need your help to be able to replicate it on my end and then troubleshoot it from there. I appreciate your patience while I try to help.
08-04-2009 12:18 PM
Grant,
First of all I run UDP sender on my host machine not on BF537 (sorry to point oput obvious things,just want to be clear).
Every time I run UDP sender all 3 LEDs change states (sometimes LED1,2 change state twice), then they are frozen again until next UDP packet is sent by sender. This is what I see.
What I expect to see is continous blinking of all 3 LEDs at 5 Hz rate (sorry I was telling you 10 Hz, but actually LED changes state every 100ms so the blinking rate would be 5 Hz). The LED1,2 have to change state because they have "wait for 100ms" VI in their loops. The LED6 should blink continously because "UDP read" should timeout every 100ms.
I'm using the default jumper settings (as in the manual). Are you able to instrument the target over TCP when debug mode is enabled?
Are you sure that your UDP sender is using correct address?
Thanks!
08-11-2009 02:19 PM
Alexander,
I get LED 1 and 2 to blink constantly and LED 6 to just be on. I can't seem to get the UDP protocol to work though. I am still looking into the issue but just wanted to give you an update on where we stand.