You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old June 3rd, 2002, 12:06 PM   #1
Mani
Member
Canada

Mani is offline
 
Join Date: Jun 2002
Posts: 5
RS 232 serial communication

Hey
Can anyone explain to me how I can write a program that will be sent through my COM1 (RS232) port. I want to send commands (from program) to a temperature controller. example command: *W012003E8, where controller will recognize this as to change setpoint to 100C. I hope my question is clear. Thanks in advance to all who respond.
Regards, Mani
  Reply With Quote
Old June 3rd, 2002, 12:50 PM   #2
bernie_carlton
Lifetime Supporting Member + Moderator
United States

bernie_carlton is offline
 
bernie_carlton's Avatar
 
Join Date: Apr 2002
Location: Yakima, Washington
Posts: 4,597
Your primary source of information will be the manual from the temperature controller manufacturer concerning the serial interface. A typical manual will have the example using the 'Hyperterminal' accessory on most PC's. Some will also show a BASIC example. To use this you would need some type of BASIC. I understand that Microsoft's old 'QBASIC' is still available on the net somwhere. Otherwise, using Visual BASIC would be a more modern alternative. I know this is very general but it's a start.
  Reply With Quote
Old June 3rd, 2002, 02:08 PM   #3
akreel
Member
United States

akreel is offline
 
akreel's Avatar
 
Join Date: Apr 2002
Location: Milwaukee, WI
Posts: 1,172
Bernie's pretty much got it nailed. Here's just a few more tidbits...

I've found the old windows terminal (winterm.exe) a little easier to use than Hyperterminal. If you've got it, I'd suggest using that one instead.
Before you attempt to do any programming, load your terminal program and try to make it talk to your device. Once you've got your baud rates matched up and you've figured out the syntax of your commands, then you can start programming. That'll make troubleshooting a whole lot easier.

I've tried using Visual Basic to write a serial communication application before, but I haven't had much luck. I can send data without much trouble, but I tend to lose data when I try to receive. Visual Basic is very event driven and I haven't figured out how to trigger my code when the device starts talking back (Does anyone have a sample app., by the way?). If you're a VB guru, you might have more luck. Otherwise, try using QBasic or batch files.

AK
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Fuji pod - serial communication gdnav LIVE PLC Questions And Answers 3 July 14th, 2011 02:12 AM
Series Six Serial Communication ? raleonar LIVE PLC Questions And Answers 9 January 9th, 2007 02:01 PM
Rs 232 / Tcpip Converter mahdi_rtt LIVE PLC Questions And Answers 5 November 24th, 2004 07:55 PM
Serial Communication protocol - Keyence Slohani LIVE PLC Questions And Answers 5 July 11th, 2004 01:56 AM
TSX37 serial communication antoine LIVE PLC Questions And Answers 3 September 9th, 2002 01:11 AM


All times are GMT -5. The time now is 10:27 AM.


.