- #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
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
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.
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..
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.
dark021 said: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...
berkeman said:I googled VB control RS-232 pins, and got lots of good hits. Here you go:
http://www.google.com/search?hl=en&...=result&cd=1&q=vb+control+rs-232+pins&spell=1
.
dark021 said:Is the syntax com1-com9 are direct address to the pins of RS232?
tnx
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
negitron said:I've included relevant comments for your VB code:
dark021 said:which of the pins of the rs232 db9pin send -5v/+5v?
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
.
dark021 said:the sad part is that i don't understand them.. I am not an engineer..im just a web programmer..
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.
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.
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.
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.
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.