Doc. # 1-0000205 | |||
---|---|---|---|
Date Updated | 07-27-2005 | Date Created | 07-27-2000 |
Document Type | Knowledge Base | Related OS | |
Related Product | COMPAD-85 |
How to use COMPAD-85 to work with ADAM-4000 modules or RS-485 devices under Windows 95/3.1? | |||
---|---|---|---|
Solution:
On COMpad-85, the RS-422/485 driver is controlled by RTS, the receiver is always ON. When working with ADAM-4000 modules or any RS-485 devices, you need to control RTS to 1 before sending command, the set RTS to 0 right after command is sent completely.
When working under Windows 95, we found it's very difficult to control the RTS switch timing correctly cause Windows is a multi-task system. So it's almost impossible to get correct response from RS-485 device. For the RS-422/485 port on our CPU card, it's the same problem.
To solve this problem, our R&D develop a DLL driver that can switch the RTS signal correctly. Attached comtest2.zip is the ADSCOMM.DLL and a VB 5.0 example to show how to use the functions in this DLL. Please notice that, due to the Tx+/Rx+ is looped back to TX-/RX- on COMpad-85 connector for RS-485 connection, the readback string will contain the command string & reply string. You need to fliter the command string in your program. This program works under Windows 95 only, not Windows NT.
We also have a 16-bit version for use under Windows 3.1 or 16-bit application. Attached comtest1.zip is the GENCOMM.DLL and a VB 3.0 example to show how to use the functions in this DLL.
|