Serial communications
c131frdave
Posts: 38
I have a new project that seems like it should be pretty simple, but is over my head.
I have a digital multi meter that is connected to an AC·generator.· The DMM has a built in occilliscope, and reports the following information on it's display screen:
Volts
Amps
Watts
Vars
VoltAmps
This meter has a serial output if you want to use it for external monitoring or reference.· The serial output sends the above information out·the port.
My project is to use a BS2 to control Vars.· The voltage regulator has two 24VDC inputs, one raises excitation, the other lowers excitation.· I would like the BS2 to read Vars from the DMM, and then use one of two relays to pulse the excitation control to move the Var output/input to a desired value.
The ultimate goal is to have a small control panel with an on/off switch, and a selector dial.· Just above the selector dial will be a digital read out that goes from -7 to positive 7, and the operator would simply turn the dial to the desired Var output/input.· The PS2 would see the selected value, use the input from the DMM's serial port to "see" the current Var output/input, and pulse the exciter up or down until the selected value and actual value match.
But, I'm a straight rookie when it comes to serial communications.· How would I be able to tell what reading is what?· The serial connection sends volts, amps, watts, vars, and voltamps.· I just want to look at the vars.· Is there some sort of serial standard that all serial devices use?· Should I ask the manufacturer for their "serial pulse scheme", or something like that?· Any suggestions?·· Thanks so much in advance.
·
I have a digital multi meter that is connected to an AC·generator.· The DMM has a built in occilliscope, and reports the following information on it's display screen:
Volts
Amps
Watts
Vars
VoltAmps
This meter has a serial output if you want to use it for external monitoring or reference.· The serial output sends the above information out·the port.
My project is to use a BS2 to control Vars.· The voltage regulator has two 24VDC inputs, one raises excitation, the other lowers excitation.· I would like the BS2 to read Vars from the DMM, and then use one of two relays to pulse the excitation control to move the Var output/input to a desired value.
The ultimate goal is to have a small control panel with an on/off switch, and a selector dial.· Just above the selector dial will be a digital read out that goes from -7 to positive 7, and the operator would simply turn the dial to the desired Var output/input.· The PS2 would see the selected value, use the input from the DMM's serial port to "see" the current Var output/input, and pulse the exciter up or down until the selected value and actual value match.
But, I'm a straight rookie when it comes to serial communications.· How would I be able to tell what reading is what?· The serial connection sends volts, amps, watts, vars, and voltamps.· I just want to look at the vars.· Is there some sort of serial standard that all serial devices use?· Should I ask the manufacturer for their "serial pulse scheme", or something like that?· Any suggestions?·· Thanks so much in advance.
·
Comments
If you have a manual and it describes how to hook your meter to a PC for example, you could use the PC to look at the format of the data and guess what the rules are for the format. It can't be very complicated.
As Mike suggests, this is not too complicated. Even without the manual, half an hour with a PC and Hyperterminal should give you the information you need to get the meter connected to the Stamp.
Cheers,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·
These are the standard (minimum) pins necessary to communicate via RS232 w/the computer.
Data in from the DVM should go to data out in the Pc, and viceversa data out to data in. You need to know the protocol in order to communicate (baud rate, #of bits, parity, etc). That should be in the manual, if not just experiment until it communicates (you can'y hurt the computer or BS). ·If you do not have the manual, contact the manufacturer or search the web for one (Just to make it easier). Once you establish communications you can figure out the data structure in no time by downloading it to a spreadsheet or word processor. Set a comma separator or TABS·to separate the fields.
Once you have that you should be able to get your DVM interfaced.
If you need any additional help do not hesitate to write.
Post Edited (batt_man) : 9/18/2008 1:15:38 AM GMT
you will use the Modbus registers 40279 – 40281 (for voltage AN, BN, CN) and 40290 (for Total VAR).
So what does that mean? lol
This looks like a good introductory link: www.simplymodbus.ca/FAQ.htm
Post Edited (Mike Green) : 9/18/2008 5:59:46 PM GMT
Basically, the stamp will ask the meter to send it the contents of those registers.
If the meter is expecting to use the ASCII version of Modbus, it can be done. If it uses the RTU version, the timing requirements can be a bit tight for the Stamp.
Assuming it is the ASCII version, one technique is to store the query statement in a DATA statement in the Stamp, including the checksum. If you Google Simply MODBUS , theres a utility program which will show you what the query statement looks like for those registers you're concerned with.
Once the meter has been successfully queried, the data coming back can be read by the stamp and interpreted from its Hex or octal format and manipulated as you desire.
Cheers,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·
I have 4 "registers", one for each phase of volts, and one for vars. So the stamp asks the meter for register xxxx and waits for a reply, right? Thanks for the help guys. The rs-282 port is connected to a rs-485 blinky blinky (I don't know what it's called), and then give a signal to the generator's computer. I hope I can tap into that some how. The instructions for the blinky blinky says it can support four devices. I have the instructions, it's just a matter of educating myself about the terminology.
Thanks again!
Blinky-blinky? RS232-485 signal converter.
Let us know how you make out.
Cheers,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·