LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Example code for tescoms er3000

I've looked at the code and see no obvious problems there. I do not have any Tescom instruments here to test with, though.

 

Test Tescom Driver.vi requires that you set the Scale Max and Scale Min to be set. Scale Min is the offset and Scale Max is the maximum pressure for the system. Convert Reading to Pressure.vi has documentation as to what the numbers are used for.

 

Are you sure that your computer and Tescom are on the same baud rate, parity, data bits and stop bits?

 

Is it showing "Data Good?" on the output?

 

    Rob

0 Kudos
Message 11 of 26
(5,575 Views)

I have three Tescom 3000s. I am using the Tescom Driver_8.2.1.llb with LabVIEW 8.6 on an ER3004 (address 3). The range of the tescom is 0-5lbs. I have set the Scale Max and Scale Min on the front panel of the vi to 5 and 0. When I select the tescom command Set Pressure and enter the value of 2, I get a warning of 1073676294 but no error. When I read back the value using the Read Setpoint command I get -0.142424 with the same warning. I have also tried the scaled method, sending a value of 1060 for 20% of range (1 psi) as explained on page 44 of the ER3000 User manual and get an error of -1073807339.

 

I am using a pci 8431/2 RS485 card. The + and - RXDs and TXDs have been properly wired. I have successfully reprogramed the Tescom addresses (1, 2, 3) using the LAbVIEW driver. I can read and change values such as the proportional and derivative but I can't do anything with the pressure.

0 Kudos
Message 12 of 26
(5,563 Views)

Error 1073676294 according to LabVIEW is: VISA:  (Hex 0x3FFF0006) The number of bytes transferred is equal to the requested input count. More data might be available.

 

 

This happens when the read request is for fewer bytes than is in the buffer. This is typical if you are having difficulty reading from the instrument. This chunk of code (from Tescom ER Command.vi):

 

Tescom Read.jpg

Reads the number of bytes from the data sent back by the Tescom. If there is an error or missing data, the number of bytes will be zero and the next read will give you the error that you are seeing.

 

Our setup that we use for all RS485 instruments is to set up the system in 4-wire Auto mode on each port and then wire the TX+ to RX+, TX- to RX-. It's amazing how often we end up switching the + and - wires on our connections to instruments.

 

The other error that you are seeing (-1073807339) is: VISA:  (Hex 0xBFFF0015) Timeout expired before operation completed. This is typical if there is no data returning.

 

I still think that there is benefit in checking connections, serial parameter and switching +/- wires for re-testing.

 

And, no, I'm not claiming that my code is perfect. 😛 I wish. But it has been functioning in our systems for a couple of years now.

 

     Rob

Message Edited by Robert Cole on 09-04-2009 11:28 AM
Message Edited by Robert Cole on 09-04-2009 11:28 AM
Message 13 of 26
(5,558 Views)

It would help to clarify how the tescom is wired and communicated with. The ER3000 does not have RXD or TXD. The documentation says it has one wire +RS485 and one wire -RS485. The pci 8431/2 RS485 port has RXD+/- and TXD+/-. I have wired the RXD+ and TXD+ to the +RS485 wire and the RXD- and TXD- to the -RS485 wire. I have set the com port to Two Wire Auto. There is no setting called Four Wire Auto but you probably mean Four Wire. I have tried resetting to Four Wire and while the results were different, I was not reading back the setpoint I had written.

 

Using the driver software: Since this particular tescom is a 0-5psi controller I have set Scale Max to 5 and Scale Min to zero. Is this correct? When using the Set Pressure command do I use the psi I want (e.g. 2.1 psi) or do I have to use the scaling called for in the manual?

 

As for the the warning of more possible bytes of data to be read, I am reading only what the driver itself is calling for as written. I have seen this warning before when I read a specific number of bytes at a port. It just means there could be more bytes, not that there are more bytes to be read.

0 Kudos
Message 14 of 26
(5,547 Views)

Hi Robert,

can you please tell me which brand(s) of USB to RS485 or RS232/RS485 converters you have had success with when communicating with the ER3000 ? I'm waiting for a reply from Tescom/Emerson for the availability of their recommended units but I've certainly had no success using a Quatech QSU-200 USB to RS485 port.  I'm about to try with an ATEN converter.

 

The ER3000 manual says:

"Third Party RS232/RS485 Converters
The RS232/RS485 converters range in modes of operation. The provided Tescom
software needs the RS232/RS485 converter to be configured in the following mode.
Table 5: Third Party RS232/RS485 Converter Mode

  • Echo off.
  • Transmitted data, SD, is used for flow control.
  • No handshake control (RTS/CTS, DSR/DTR).
  • Additionally, for 4-wire RS422 converters (half duplex).
Connect: +TD to +RD.
Connect: -TD to -RD."

The manual also has unusual requirements on the termination resitances.  RS485 twisted pair is usually 120Ohm terminated, but the ER3000 manual says:

 

"10.6 Acceptable Resistance Values
The resistance values must be measured with all external wiring disconnected, including
the power. Ensure converter screw terminals are tight.
10.6.1 ER3000 RS485 Interface
• +RS485 to GND = 10KΩ to 50KΩ
• -RS485 to GND = 10KΩ to 50KΩ
10.6.2 Converter RS485 Interface
• +RS485 to GND = 3K to 5KΩ
• -RS485 to GND = 900Ω to 1.2KΩ
"

regards

 

Peter
0 Kudos
Message 15 of 26
(5,279 Views)

Actually, I have never used USB with anything in LabVIEW. the majority of our systems on PXI or PCI use RS485 serial cards. No converters in the system.

 

If we have to convert, we have had our best success with Phoenix Contacts' PSM-ME-RS232/RS485-P converters.

Phoenix Serial Converter Catalog

 

We have also used the B&B converter but only at our desks for testing code.

B&B Serial Converters

 

There are a few others out on the market, but none that we have made much use of.

 

I hope this helps.

 

      Rob

0 Kudos
Message 16 of 26
(5,248 Views)

Many thanks Rob.

 

It has turned out that the most likely reason we can't communicate with our ER3000 is that our Quatech QSU-200 RS485 port and our ATEN RS232/RS485 converter doesn't implement Automatic flow control.  In half duplex mode (2 wire RS485), the transmitter's electrical output must be automatically turned on when data is ready from the PC on the Transmit line.   Once no more Tx data is present the Tx port should be made to go high impedance so that the ER3000 can transmitt a reply which is read on the Rx line.

We just need to purchase another brand like the ones you identified from B&B Electronics (but it will be a different brand/supplier in OZ).

I'm attaching a sheet from Tescom identifying characteristics of a suitable RS485 port or converter.

 

rgds

Peter
Message 17 of 26
(5,243 Views)

Thank you for the document. If we work with Tescom products in the future, we can use this and not work by trail and error (again).

 

The Phoenix Contacts device should be available from a distributor somewhere for you. I like it because all of those hardware and configuration choices are switch selectable on the unit. Makes it a little more expensive, but has great configurability. We have had some in the field running non-stop for more than 7 years now.

 

Just drop a message on here when you find a solution that works. It will help with anyone else searching for information about Tescom products.

 

     Rob

0 Kudos
Message 18 of 26
(5,223 Views)

The RS232/RS485 converter arrived on Monday and it worked first time.  It is the TOD-001 RS232 to RS422/RS485  Isolated Converter The main difference to my other 2 converters is that it supports Austomatic flow control

 

I'm now trying to change the PID gains and integral deadband value to see how that effects its ability to hold a constant pressure (and thus permit a constant flow through a DHI Molbloc).  Right now the ER3000 output pressure is oscillating with a long time period (100sec) resulting in oscillating flow of about 6 to 7slm about the nominal value of 250slm. Unfortunately changing the abovementioned values have no effect.  I'll pass on any info once I find out the reason why.

 

rgds

 

Peter
Message 19 of 26
(5,169 Views)

Interesting. I have no suggestions for fixing this. We do not use pressure controllers in situations where perssure and flow are critical. We use the controllers for pneumatic rams used to put pressure on stacks of fuel cells. A few PSI in either direction is not a worry. Typically, the system is brought up to pressure and left (no constant flow). We calibrate the pressure exerted by the ram, but have not tested as extensively as you are doing.

 

For finer control we use pressure controllers from Marsh Bellofram: Pressure Control Catalog

 

So, I find this interesting and please keep us informed of your findings.

 

     Rob

0 Kudos
Message 20 of 26
(5,158 Views)