ehonda Posted October 19, 2006 Report Posted October 19, 2006 Hello all, I am creating a simulator using WinXp Pro and Labview 8.0 which communicates to a device serially using RS-485. The serial bus is at 115.2kbaud. The device sends a command to the simulator in a polling fashion, where the command is sent every ~2msec. The device does not wait for any acknowledgement or response, and will send another cmd in the next ~2ms... over and over. I need to send a complete response to the command before the device sends it's next command (the 2ms window). Using an oscilloscope and the application I wrote (set VISA comm--->while loop with serial read then write, no delays) I have noticed that it takes anywhere from 1 to 2.7ms(always varies) for my simulator computer port to write to the data bus. If it takes longer than 2ms to write, the data overlaps and the device craps out. I am pretty sure the problem is not labview and that its a windows to port issue. Does anyone know how I can reduce the winXP delay to the serial port? note: I have observed that when I first start my Labview application it transmits very fast ~700uS, but after ~ 2secs it slows down to 2.7mS any input would be much appreciated thx e Quote
joltosa Posted October 20, 2006 Report Posted October 20, 2006 Seems like a classic software jitter problem. My guess is that you'll have a really hard time getting the job done in a reliable way unless you switch to a real time operating system. Try killing every process you can from the System Tray and Task Manager and see if that helps. Quote
mrak1 Posted October 20, 2006 Report Posted October 20, 2006 Try killing every process you can from the System Tray and Task Manager and see if that helps. You could also try setting the priority of the LabVIEW process to HIGH. However, there is no guarantee that Windows will not preempt the LabVIEW application for something as simple as a mouse event. Good luck! Mike Quote
peteski Posted October 23, 2006 Report Posted October 23, 2006 Hello all,I am creating a simulator using WinXp Pro and Labview 8.0 which communicates to a device serially using RS-485. The serial bus is at 115.2kbaud. The device sends a command to the simulator in a polling fashion, where the command is sent every ~2msec. The device does not wait for any acknowledgement or response, and will send another cmd in the next ~2ms... over and over. I need to send a complete response to the command before the device sends it's next command (the 2ms window). Using an oscilloscope and the application I wrote (set VISA comm--->while loop with serial read then write, no delays) I have noticed that it takes anywhere from 1 to 2.7ms(always varies) for my simulator computer port to write to the data bus. If it takes longer than 2ms to write, the data overlaps and the device craps out. I am pretty sure the problem is not labview and that its a windows to port issue. Does anyone know how I can reduce the winXP delay to the serial port? note: I have observed that when I first start my Labview application it transmits very fast ~700uS, but after ~ 2secs it slows down to 2.7mS any input would be much appreciated thx e I've been doing highly timed serial port writing using LabViews ETS RTOS v7.1.1. The one restriction that I found kind of obnoxious is that I had to use the motherboard's serial ports, as I was using a "standard" Pentuim 4 computer and there are no RTOS drivers for NI's multi-port serial cards (which we have several of from a former project). Besides that one problem, I've found that I could reliably time serial writes with about 60 microseconds of jitter, as measured via oscilloscope. In my application, I have to write certain charaters at certain times within a 35.7 millisecond window, at a baud rate of 115,200. Another option, if you got the money and time for it, would be to try to program one of NI's FPGA's to do something similar. That could probably get the timing jitter down even farther. Hope this helps, -Pete Liiva Quote
ehonda Posted October 23, 2006 Author Report Posted October 23, 2006 thanks for the info guys, I tried the priority and task reduction ideas with no success, I'm going to try and get a demo of the labview RT module and see how that works. e Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.