Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

controlling a signal generators thru RS232

Status
Not open for further replies.
Try loopback first. Connect TD to RD, CTS to RTS, DTR to DSR. You may only need the first one. Check for echo or a double echo so at least you know your port is working. Hyperterminal was removed from win 7, but if you place the dll and the application in the same directory it should work under win 7.
Hi, have tried loop back. comport ok. and verify that the protocol and serial data send out from PC is correct

once connected to the signal gen, the signal generator output a error "RS232 Framing error" Chapter5 236 (https://www.home.agilent.com/upload/c...DE_ENGLISH.pdf)
May i know what is this? anybody encounter this?

is it because of 'floating point'
 
Last edited:
chapter 4 page 133
SYSTem:LOCal
SYSTem:REMote
SYSTem:RWLock

do i need to include in the serial message?



Chapter 4 pg198 (https://www.home.agilent.com/upload/c...DE_ENGLISH.pdf)
DTR / DSR Handshake Protocol
...
To disable the DTR/DSR handshake, do not connect the DTR line and tie
the DSR line to logic TRUE.
If you disable the DTR/DSR handshake, also
select a slower baud rate (300, 600, or 1200 baud) to ensure that the
data is transmitted correctly.
...
isn't tying the DSR line to a 5V to indicate logic True?
 
Last edited:
SYST:REM will turn on the REMOTE light. SYST:REMLock disables the front panel. SYST:REM is necessary first. Making a light change is a good first step.

Rs232 used levels from -25 to -3 and +3 to +25 for and has been relaxed. RS232 doesn't work well at +-5V. +-12 Is more normal for Rs232.

Who ever told you that +5 is a high? In the Rs323 World, negative voltages are high: http://www.interfacebus.com/Design_Connector_RS232.html at the external interface.

A quick way to look at the specs are DSR/DTR say the interfaces have power.
CTS/RTS say that the interfaces say that they can accept/reject data (Hardware flow)
TD/RD where data is sent/received
RI - Ring indicator,the phone/modem is ringing
SG - Common
PG- Protective ground (usually not needed)

The standard got so mangled that anything is possible. Always use voltages at the connector.

A framing error is a MAJOR communication problem. Baud or flow, typically. It can also be the number of stop/start/data bits and/or parity.
 
Last edited:
I've programmed a number of RS-232 instruments using python. There are two libraries that can be used. One is pyvisa which is nice because it lets you seamlessly control RS-232, GPIB, and USB instruments (I've used all three to talk to different instruments and it works well). If you just need to talk to a serial instrument, you can also use pyserial.

Note python and these libraries are open source and free to download. Modern computers typically don't have RS-232 interfaces anymore, so you'll probably have to buy a USB-to-RS-232 adapter (usually $10-$15).

Once you get a connection established, that's half the battle. The other is figuring out the idiosyncrasies of the instrument. I've had to do battle with quite a few RS-232 instruments and I believe a few of them had incorrect or flawed firmware implementations. Such things can lead to long hours of trying things and frustration when you don't have a logic analyzer. :)
 
squishy:
Tell me about it. The Rs232 breakout box was a big help. Some of the more expensive ones were like $300. That can help you get the handshaking right. Some instruments actually dispensed with DTR and used CTS/RTS for hardware flow. These wierd implementations is not likely to occur with HP/Agilent equipment.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top