Recloser Control: PC Programming for 9 Pin RS232 Port

  • Thread starter dark021
  • Start date
  • Tags
    Control
In summary: Not usually. In the PC COM port context, COM1 and COM2 are usually two separate DB-9 connectors on the back of the PC. COM3-COMn are logical overloads of...
  • #1
dark021
7
0
I'm new to Hardware programming, Can you give me an idea on how to create a controller on recloser via PC?? The recloser has a rs232 Port, and its a 9 pin.. Thanks... i need it badly thank you
 
Engineering news on Phys.org
  • #2
dark021 said:
I'm new to Hardware programming, Can you give me an idea on how to create a controller on recloser via PC?? The recloser has a rs232 Port, and its a 9 pin.. Thanks... i need it badly thank you

What languages are you comfortable programming the PC in? Most languages will have an interface to the RS-232 COM ports -- I've used Tcl/Tk before to interface to an RS-232 device from a PC.
 
  • #3
You can even interface to a serial port with BASIC. Use the OPEN "COMn: [baud] [,parity][,data][,stop][options] AS [#] filenum [LEN=num]
 
  • #4
berkeman said:
What languages are you comfortable programming the PC in? Most languages will have an interface to the RS-232 COM ports -- I've used Tcl/Tk before to interface to an RS-232 device from a PC.



Can I used Vb.net on that?? what devices did u use?? can u give me a step by step instruction on controlling the pins of the Rs232?.. The real deal is i have to sen atleast 5V on rs232 going to the recloser.. thank you again..
 
  • #5
dark021 said:
Can I used Vb.net on that?? what devices did u use?? can u give me a step by step instruction on controlling the pins of the Rs232?.. The real deal is i have to sen atleast 5V on rs232 going to the recloser.. thank you again..

Your PC will output +/-12V on the RS-232 signals. The minimum to meet the standard is +/-5V, I believe.

Yes, you should be able to write to the COM port using VB.net. Just look in the Help files or other instructional materials you have to see the format used for opening, writing, reading and closing the COM port.
 
  • #6
berkeman said:
Your PC will output +/-12V on the RS-232 signals. The minimum to meet the standard is +/-5V, I believe.

Yes, you should be able to write to the COM port using VB.net. Just look in the Help files or other instructional materials you have to see the format used for opening, writing, reading and closing the COM port.

i admit i m an idiot on this one,, can u give some reference books regarding on this? how will i check if 5volts is flowing on my Cable? Can I also control the PINs of the Rs232 port? thanks again...
 
  • #8
i have this following codes.. i don't understand them... can u xplain them..

Const Xon = &H11
Const Xoff = &H13

Private Sub Command1_Click()
MSComm1.Output = "123456789" & Chr$(Xoff)
End Sub

Private Sub Command2_Click()
MSComm1.Output = "987654321" & Chr$(Xon)
End Sub

Private Sub Form_Load()
Form1.Caption = "App1"
With MSComm1
.Handshaking = 2 - comRTS
.RThreshold = 1
.RTSEnable = True
.Settings = "9600,n,8,1"
.SThreshold = 1
.PortOpen = True
End With
Command1.Caption = "&Send Xoff"
Command2.Caption = "Send &Xon"
End Sub

Private Sub Form_Unload(Cancel As Integer)
MSComm1.PortOpen = False
End Sub

Tnx
 
  • #10
dark021 said:
Is the syntax com1-com9 are direct address to the pins of RS232?
tnx

Not usually. In the PC COM port context, COM1 and COM2 are usually two separate DB-9 connectors on the back of the PC. COM3-COMn are logical overloads of these two ports, and to be honest, I've never understood them very well. If you want to talk to an RS-232 device, just use the COM1 port, and connect the cable to your device to the DB-9 in the back of your PC labeled COM1.
 
  • #11
I've included relevant comments for your VB code:

dark021 said:
// Sets constants Xon to hexadecimal 11 and Xoff to hexadecimal 13
Const Xon = &H11
Const Xoff = &H13

//Declares a subroutine for an event handler when button Command1 is clicked
Private Sub Command1_Click()
// Writes the string "123456789" to the output buffer of the comm port MSCOMM1
// with Xoff masked in.
MSComm1.Output = "123456789" & Chr$(Xoff)
End Sub

//Declares a subroutine for an event handler when button Command2 is clicked
Private Sub Command2_Click()
// Writes the string "987654321" to the output buffer of the comm port MSCOMM1
// with Xon masked in.
MSComm1.Output = "987654321" & Chr$(Xon)
End Sub

// Form load event code
Private Sub Form_Load()
// Sets the form caption
Form1.Caption = "App1"
// Initializes parameters for the MSComm1 comm port
With MSComm1
.Handshaking = 2 - comRTS
.RThreshold = 1
.RTSEnable = True
.Settings = "9600,n,8,1"
.SThreshold = 1
.PortOpen = True
End With
// Sets the button text for Command1 with "S" as the shortcut
Command1.Caption = "&Send Xoff"
// Sets the button text for Command2 with "X" as the shortcut
Command2.Caption = "Send &Xon"
End Sub

// Forum unload (application close) event handler
Private Sub Form_Unload(Cancel As Integer)
// Closes the comm port MSComm1
MSComm1.PortOpen = False
End Sub
 
  • #12
negitron said:
I've included relevant comments for your VB code:

which of the pins of the rs232 db9pin send -5v/+5v?
 
  • #13
dark021 said:
which of the pins of the rs232 db9pin send -5v/+5v?

Why don't you tell us? There are better sources on the web for very basic information like how an RS-232 port works electrically. I would prefer that you do that research first, and then ask us questions if you don't understand what you are researching and reading. Please also provide web pointers to what you are reading and not understanding.

Google is your friend -- learn to use it well. Also, wikipedia.org is a fairly good source of information, as long as you remember that it is publicly-run and anybody can modify the information on it. For basic stuff like RS-232 DB-9 voltages, it's a good place to start:

http://en.wikipedia.org/wiki/RS-232

.
 
  • #14
berkeman said:
Why don't you tell us? There are better sources on the web for very basic information like how an RS-232 port works electrically. I would prefer that you do that research first, and then ask us questions if you don't understand what you are researching and reading. Please also provide web pointers to what you are reading and not understanding.

Google is your friend -- learn to use it well. Also, wikipedia.org is a fairly good source of information, as long as you remember that it is publicly-run and anybody can modify the information on it. For basic stuff like RS-232 DB-9 voltages, it's a good place to start:

http://en.wikipedia.org/wiki/RS-232

.


But i don't understand them.. i need someone to explain them to me.. that s why i ask u guys.. and thanks for replying on some of my messages... The real problem is this... My company ask me to create a SCADA system for electric utility. My strategy is before i can create the SCADA i need to control first the Recloser on an electric substation, i need to send signal from a remote area to the recloser. the recloser has RS232 connection and an ethernet connection(RJ45 connection) that's is why I'm studying the pins of the rs232..the sad part is that i don't understand them.. I am not an engineer..im just a web programmer..
 
  • #15
You don't need to understand them; you need only understand how to send data out of the port and how to receive data in. You don't need to know how a VCR works inside in order to program it to record a TV show. Presumably, your recloser controller has a user manual which contains the instructions you need to perform various functions and how it reports back its status and such. Start with that, then design an algorithm to do what the recloser manual tells you needs to be done. Presumably, you're going to be connecting the PC to the recloser with an RS-232 serial cable, so you don't need to know what pins do what. You handle all that transparently via software. Learn how to open, read from and write to a COM port using whatever language you're going to be using; the operating system will handle the gritty hardware-level details for you.
 
  • #16
dark021 said:
the sad part is that i don't understand them.. I am not an engineer..im just a web programmer..

I agree 100% with negitron's reply. But beyond that, I have a fundamental problem with your thread. A recloser involves life safety:

http://en.wikipedia.org/wiki/Recloser

and you are saying that you have been tasked with programming Auto Reclosers. And, to be blunt, you appear to have very little practical knowledge of programming COM interfaces and real-time embedded systems.

We will not help you learn how to program life safety level systems here -- you need to take classes and receive certifications to do that.

This thread is closed, per the PF Rules link at the top of the page.
 

1. What is a recloser control?

A recloser control is a device that is used to detect and interrupt faults in an electrical distribution system. It is typically installed on a pole or in a substation and is responsible for automatically opening and closing the circuit to protect the system from damage.

2. Why is PC programming necessary for a recloser control?

PC programming is necessary for a recloser control in order to configure and customize its settings, such as timing, sensitivity, and operation modes. This allows for more precise control and optimization of the recloser's performance.

3. What is a 9 pin RS232 port and how is it used in recloser control programming?

A 9 pin RS232 port is a type of serial communication port used for connecting devices, such as a PC, to a recloser control. It allows for the transfer of data between the PC and the recloser control, enabling programming and monitoring of the recloser's functions.

4. Can any PC be used for programming a recloser control?

No, not all PCs are compatible with recloser control programming. The PC must have a 9 pin RS232 port and the appropriate software installed in order to communicate with the recloser control. It is also recommended to have a PC with sufficient processing power and memory for efficient programming.

5. Are there any safety precautions to consider when programming a recloser control?

Yes, it is important to follow all safety guidelines provided by the manufacturer when programming a recloser control. This may include wearing appropriate personal protective equipment and ensuring that the recloser is disconnected from the power source before programming. It is also important to carefully review and test all configurations before activating the recloser control.

Similar threads

  • Electrical Engineering
Replies
15
Views
940
Replies
37
Views
3K
  • Electrical Engineering
Replies
11
Views
964
Replies
3
Views
854
  • Electrical Engineering
Replies
1
Views
2K
  • Electrical Engineering
Replies
7
Views
3K
  • Electrical Engineering
Replies
7
Views
1K
  • Electrical Engineering
Replies
3
Views
255
  • Electrical Engineering
Replies
15
Views
2K
Replies
80
Views
3K
Back
Top