RS-232-C port using with Visual Basic
RS-232-C port using with Visual Basic
(OP)
Hi,
I'm new to creating programs that capture data. I'm used to creating programs that will analyze and manipulate it instead. Anywho, my problem is trying to hook up two 3395 HP integrators to a PC. I have a cable that plugs into the RS-232-C port on the back of the integrator and then outputs to the parallel port. Then I plug an adapter that converts the parallel to a serial, but I'm not sure if that will work.
Right now I'm trying to use the MSCOMM object in VB without any luck. The integrator transmits in ASCII, but I don't know if the connection will work, let alone the code. Has anyone done anything like this? Any help would be much appreciative! Thanks much!
Julian Boardman
I'm new to creating programs that capture data. I'm used to creating programs that will analyze and manipulate it instead. Anywho, my problem is trying to hook up two 3395 HP integrators to a PC. I have a cable that plugs into the RS-232-C port on the back of the integrator and then outputs to the parallel port. Then I plug an adapter that converts the parallel to a serial, but I'm not sure if that will work.
Right now I'm trying to use the MSCOMM object in VB without any luck. The integrator transmits in ASCII, but I don't know if the connection will work, let alone the code. Has anyone done anything like this? Any help would be much appreciative! Thanks much!
Julian Boardman





RE: RS-232-C port using with Visual Basic
But if the integrator has a serial port (RS-232), then why not plug it directly ito the PC's serial port?
Wheels within wheels / In a spiral array
A pattern so grand / And complex
Time after time / We lose sight of the way
Our causes can't see / Their effects.
RE: RS-232-C port using with Visual Basic
Regarding software, it is very easy to write code based on MSComm control. Check the communication settings prescribed by the manufacturer. As suggested by another poster, do test the communication using hyperterminal before proceeding to code.
Good luck
Yeasir Rahul
Principal, VoltSmith Technologies
www.voltsmith.com
RE: RS-232-C port using with Visual Basic
m777182
RE: RS-232-C port using with Visual Basic
Yeasir I think you're right, the 25pin cable is for a modem, I had thought it was for the parallel port. If I had a cable that went from the RS-232-C to the serial port in the PC I would use it. m777182 the integrator can use handshaking. It was not on, but I opened it up and flipped the dip switch to allow it.
Basically all I have tried it to do is extract some data from the integrator. I don't need the PC to tell the integrator to do anything, I just need the data that is printed out to be outputted to the PC as well. I've never use Hyperterminal, so I contacted the rest of our IS about it and hopefully they know something.
Thanks again for all of your help!
Julian Boardman
RE: RS-232-C port using with Visual Basic
The smaller of the two problems is that I can't seem to get the PC to successfully communicate commands to the integrator. My guess is because the integrator needs to be in Remote mode for this to happen, but I can't seem to get it in that mode.
The larger problem is that I figured out how to capture the data that is being transmitted to the PC, but I can't make any sense of it. Here is a sample of some of the output from the integrator:
04AD041B046A0482048304E4047005B7041005100583057C04E304630C7D06F305F5056814C80D62
24C81ED21C0017DD25C1252A255406981C092455256720EE1A49137E1AD51B9A2002219910131817
15C10E8B065E02B824471E161C4434422F3B2D13276537F836FF35D324D52FF4351B37D930ED23B2
331E380D38F6322D2BF0305D328F183A1B2222D528DD01D9035C101F044000100051015300120438
0000141204390400040000000000FFFF00000400002F00EA00B2B2FF2020203C15FBFE2020202020
3A333520202020202032313A3233312C203139303109004A414E20202F003C15FBFE01
Q1EB9AD9.BNC
The only thing that I can understand is that the "Q1EB9AD9.BNC" is the name of the file saved on the integrator. Any ideas what any of the rest is?!?! Thanks!
Julian Boardman
RE: RS-232-C port using with Visual Basic
TTFN
RE: RS-232-C port using with Visual Basic
Thanks.
Julian Boardman
RE: RS-232-C port using with Visual Basic
In your manual you should find the format of your data field that your integrator is using; presumably it consists of a few fields or blocks with text, numbers and maybe text again.The format is probably of fixed lenght.You should split the transmited record into individual parts.
The entire lenght of your data stream seems to be 470 bytes long and the additional 12 bytes were added by operating system or by your integrator at saving process and they are written in dec not in hex starting with char "Q". Try to develop a code to catch the 013 and 010 and adjust your input buffer lenght to the maximum lenght of your single data block. Try to avoid handshaking between your PC and the integrator because it makes it more difficult to communicate.
Ask again.
M777182