I have a PCI-485/8 card where I need to use all 8 ports. Attached is the vi that I�ve developed so far. It works well when there are only 1 or 2 ports. But it really slows down the calling vi when I get up to 8 ports. The Read Delay is intended to set the polling pace, which is used to set the data logging rate. The calling vi is a timed while loop where dt = 0. Due to constraints of the polled device, I cannot set the delay less than 1200 mSec, so it�s set to 1500 mSec as a safety margin.
The poll string is !!SS0n where n is the address number and must be followed by \r\n. Because the poll must be terminated with \r\n, the termination character (for the VISA Configure Serial Port function) cannot be A or D (hex). Otherwise it sees it�s own poll, terminates, and then ignores the responding string. (The polled devices works from RS-485, 2-wire.) As a secondary question, I�d like to know if there is a way to have it ignore its own poll string. But the bigger issue is that it�s dreadfully slow (i.e. around 10 seconds) with all 8 ports configured. The goal is to have this thing run at a consistent 1500 mSec.
Please note that I may be approaching the program from a wrong direction and I�m certainly open to use a better way. For example, it may be more appropriate to obtain the data continuously instead of using a polling scheme. The devices being polled is capable of sending data continuously. However, I choose to use the polling method for three reasons. 1) The device does not send data at a continuous rate. (They are slow and not particularly stable.) 2) The provided data string is not consitent. The string varies in length, which may be the cause of the first problem. 3) There is a project scheduled where I will need to poll at least two devices on each port. (I realize that will really slow things down, but I�ll cross that bridge when I get there.) In other words, I�m open to set the devices on the ports in continuous mode if that�s the only way to get a fast and consistent system.
The application is for an off-shore oil rig where they want to monitor and log data from 8 winches that operate the anchor lines. I�m using LV 7.1, Win2000, NI-Serial v1.6. Please advise�