Hi Les, thanks for your reply.The active item is the one that provides the current for the loop. The passive item does NOT provide the current for the loop. The passive end probably just consists of 2 opto isolators (One for transmit and one for receive.) Post a schematic of how it was originally wired and how it was wired after you connected something to it. I suspect you have connected something in parallel with the loop rather than in series with it. You also have to make sure that the voltage supplied by the active end is enough to deal with the extra voltage drop caused by the added receiving device inserted into the loop. It does not make sense to have more than one transmitter in a loop.
Les.
Hi.. Les..I have never seen a single current loop used for two way communication. Normally there is a loop for sending for each direction the data is sent. To use a single loop for two way data will require a protocol that avoids both ends transmitting at the same time.
The way you have connected your second controller is wrong. You no longer have A LOOP. The way a current loop works is there is either current round the loop or no current round the loop. (The static state is normally current flowing round the loop.) Think of the transmitter as a normally closed switch. Think of the receiver as an opto coupler. The current flowing through the LED part of the coupler causes the photo transistor in the coupler to be conducting. When there is nothing transmitting all the switches will be in the closed so there will be current through the loop. So any opto couplers in the loop will have current passing through them.
You need to break the existing loop and insert the second controller into the loop. (With the polarity correct.) There can only be one active item in the loop. On the equipment that I worked on (Terminals connected to computers.) there were switches or jumpers to set the devices to be active or passive.
Les.
// ===============================
char outmonitor;
int temp, j;
serBopen (5787L);
serBparity (PARAM_EPARITY);
b_rtson ();
for (j = 0; j <30000; j ++);
b_rtsoff ();
outmonitor = 0;
// this is the block for reading transmitted data
while (! outmonitor)
{
temp = serBgetc ();
if (temp! = - 1) {
printf ("% 02X", temp);
}
}
// =================
OK, so now it is clear that this is a data communications loop, not an analog loop with occasional serial data. But still, it has to be a series loop, no stuff in parallel. And probably yes, one talker and others just listening. But in some varieties of loops there can be multiple talkers.Hold it! 4-20 mA is totally separate animal. it's analog. It allows a sensor to be powered and read with just two wires. 4 mA is sucked off to power the sensor. Active and passive go with this system.
The serial current loop is just called 20 mA current loop. There are other standards. The ASR33 teletype was natively 20 mA current loop. DEC (Digital Equipment Corps) console terminal was often Current loop.
The serial protocals like RS323, RS422, RS485. they are forgiving to one extent, you can flip all the wires all you want and no damage will occur. RS232 was easy with a "breakout box" Occasionally, some bozo doesn;t know how to use RTS and CTS properly or redefines DTR and DSR or uses DSR and DTR for CTS and RTS. Those were the good ole' days.
Current loop for data might be just 4 wires.
The serial protocol is master/slave. No such thing as two masters. RS485 I think has some multi-master modes.
I've tapped RS232 to do some monitoring.
Hi les..I am VERY poor at "C" programming so I'm not sure I fully understand your program. (I find assembler much easier to work with.)
Can you confirm / answer the following.
1 My understanding is that with your schematic in post #9 the original communication between the "Device" and the original controller 1 works as it should. Am I correct.
2 Am I correct that controller 2 is only monitoring data and does NOT transmit data.
3 I am not clear if you are not seeing data from either the device or controller 1 or if you can only see data from one of them. Can you clarify this.
4 can you post the schematic of the interface parts of the device and controllers 1 and 2
Les.
Hi les..I assumed that you did not have the schematic of the 20 mA loop to RS232 converter board as you have not even posted the user manual. I only want to see the part of the schematic around the Opto isolator (4n35) so it should not be difficult to trace out. With no traffic on the loop can you measure the voltage between pins 1 and 2 of the 4N35. I expct a reading of about 1.5 volts. I am particularly interested in the polarity of this voltage. Do you have an oscilloscope to look at signals on the converter board ? I am wondering if there is data but it is not a protocol or baud rate that the device you are using to display it understands.
Les.
by Jake Hertz
by Duane Benson