From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,a7a23ab6e9c8286f,start X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,a7a23ab6e9c8286f,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-06-27 13:45:50 PST Xref: gmd.de comp.sys.dec:8468 comp.os.vms:25812 Path: gmd.de!xlink.net!sol.ctr.columbia.edu!usc!wupost!kuhub.cc.ukans.edu!husc-news.harvard.edu!husc8.harvard.edu!mlevin Newsgroups: comp.sys.dec,comp.os.vms Subject: how to read RS232 signals in C on VMS? Message-ID: <1993Jun27.163443.25261@husc14.harvard.edu> From: mlevin@husc8.harvard.edu (Michael Levin) Date: 27 Jun 93 16:34:42 EDT Distribution: usa Organization: Harvard University Science Center Nntp-Posting-Host: husc8.harvard.edu Suppose I have a VaxStation 3100 running VMS. Suppose I have a device (actually a Fortress UPS unit) which has a serial port. I have a technical spec for this device, which tells me that this device holds various pins in this serial port at +12V DC to indicate various conditions. Suppose I want to read these from a C program. Is this possible? The vaxstation has those phone-type plugs in back. One of these I have connected to a line printer, and it works fine. So, I figure I will take the other one, and use a bunch of cables (including that phone-wire type cable) to connect it to the serial port of this device (it looks like a small version of the RS232). The big question is, how do I know when a certain pin is at 12V or not, in a C program? Are there some kind of system service calls for this? If anyone knows how to do such a thing, please email mlevin@husc8.harvard.edu directly. I know it must be possible, since the company sells a kit to do this for several hundred dollars. The kit looks like it consists of nothing but cables and a program, so it strikes me that I might be able to do it myself. Mike Levin