Remote I/O Q&A

 


Technical Paper


Presented by:

 



Abstract

This paper covers frequently asked questions and answers regarding Remote I/O.

 

Contacts

support@citect.com

 

 


Question 1

 

I can call IODeviceControl(x,9,1) and "page unit" in the kernel shows "dialling disabled", but IODeviceInfo(x,18) returns 0 instead of 32 as documented.

 

 

 

 

Answer 1

IODeviceControl(x, 9, 1) disables the dialing schedule only - not the unit. Thus 0 is the correct return value. You need to disable the unit also to get a value of 32 returned.

 

 


Question 2

 

If we power off the modem whilst Citect was attempting communications with the rtu, then Windows Telephony API (TAPI) takes about 5 minutes to report that the modem was dead and more time to actually do anything about it. This can lead to what looks like a lock up condition in Citect and complete loss of modem control. For example what seems an endless loop of these messages when I debug the dial scheduler;

 

 

DIAL SCHEDULER Fri May 24 16:45:17 2002 52:34:27.569

Unit 'K3' waiting for an available line.

DIAL SCHEDULER Fri May 24 16:45:37 2002 52:34:47.557

Line Device Select for Unit 'K3'.

Device 'Standard 56000 bps V90 Modem' is in use.

Device '' is incompatible.

Device 'WAN Miniport (L2TP)' is incompatible.

Device 'LPT1T' is incompatible.

Device 'IPCONF LINE' is incompatible.

Device 'H323 Line' is incompatible.

DIAL SCHEDULER Fri May 24 16:45:37 2002 52:34:47.567

Unit 'K3' waiting for an available line.

 

 

 

Answer 2

 

This scenario is out of our hands and very little we can do about it. Most often though Citect recovers (for want of a better word) or regains use of the modem and normal scheduled communications is restored - though after quite some time.

 

 


Question 3

 

The redundant Citect Servers are connected to modems via Terminal Server. Thus, communication protocol use for Citect Servers to RTUs is through MODBUS-TCP. Communication from modem to modem is done via dial-up connection. The RTUs are configured to support "dial able on request". This means that the RTUs will initiate dialing and establish communication with Citect server, send data back to Citect Servers whenever the value changed has exceeded pre-defined dead-band or when alarm/event detected.

Can Citect be configured in the way that it will answer the call (dialed from remote RTUs), and receive data from the RTUs (acting as MODBUS Slave) on MODBUS-TCP protocol?

 

 

Answer 3

 

Dial in has been designed only to work via PSTN with a unique ID configured for each unit.

 

 

 


Question 4

 

I see the following error in the kernel when debugging a dial up system;

DIAL SCHEDULER Wed Jan 02 15:21:59 2002 05:24:12.873

Unit 'P0000004', State 'Connection lost', Device 'Standard 9600 bps Modem', Phone # '51271233', Caller ID '01040047'

Answer 4

 

This indicates that the modems dropped the line for some reason; the connection was lost, nobody knows why but could be something like the inactivity time out on the modem at the far end

 

 


Question 5

I'm Trying to connect citect (windows 2000 and Citect vers 5.31) to a RTU device ( matsushita Plc) with a gsm modem. I have worked always with analog modem and always all works good if I try to connect a gsm modem (I believe that for citect its should be transparent) CITECT shows a message in the Kernel;

( LINE_REPLY device Modem standard a 9600 bps Param( request 65962,OPERATION FAILED)

The gsm modem is a Siemens M20.

 

Answer 5

 

First of all upgrade the firmware in the modem. You can find it on Siemens homepage.

The modem set up is pretty important. Below are the AT commands I found to offer the best communication performance with these modems.

At the Citect Server PC:-

Command (Description)

AT+IPR=9600 (Set the baud rate to 9600)

ATV1 (Enable long responses (e.g. OK instead of 0))

ATQ0 (Result codes are sent on RS232 connection)

ATE0 (Commands from PC are not echoed back on the RS232 line)

AT&C1 (DCD will follow carrier on the line)

ATS0=2 (Number of rings required before the modem answers an incoming call)

AT+CBST=7,0,0 (Bearer service type = 9600, asynchronous, transparent)

AT&W0 (Store settings)

 

At the IO Device:-

AT+IPR=9600 (Set the baud rate to 9600)

ATV0 (Enable short responses (e.g. 0 instead of OK))

ATQ1 (No result codes sent on RS232 connection)

ATE0 (Commands from device are not echoed back on the RS232 line)

AT&D0 (Modem ignores the DTR signal)

ATS0=2 (Number of rings required before the modem answers an incoming call)

AT+CBST=7,0,0 (Bearer service type = 9600, asynchronous, transparent)

AT&W0 (Store settings)

 

You -may- need to tune the Citect driver parameters to cater for the transmission delays encountered with GSM modems. These delays are highly dependant upon the particular GSM carrier, but I found it took about 1 second for a complete communication cycle (i.e. time taken from Citect sending data frame to to modem to receiving a response from the RTU). Most

Citect drivers are not tuned for such delays. The parameters to particularly watch out for are [<Driver>]Timeout, Retry and Block.

 

 

 

 

 

 

 

 

 

 

 

 

Question 6


The D-Link DFM-560E is not usable by Citect as a dial-in modem (it's ok as a dial-out modem).

 

 

Answer 6

 


We can get away with normal DTR operation (AT&D2) for dial-out modems, but we require DTR override (AT&D0) for dial-in modems so we can read the Caller ID without the modem hanging up when no DTR is received.

 

When the DFM-560E is configured with no handshaking and DTR override it will not respond to a command to hang up.

Question 7

 

 
2 I/O servers some dial up devices are pri some are s/by.  The customer also needs to;

 

·        change schedules in runtime

·        connect on demand using cicode IODeviceControl(..., 7,....)

Issues;

He finds that if he uses IODeviceInfo() we cannot establish which is the active server?

If a forced connection is made and then either the I/O server is killed or the modem dies, how do you get the s/by to complete the forced connection?  Also the IODeviceinfo() function is returning useless info about the standby (non-active) I/O server.

Answer 7

 

 
IODeviceInfo() and IODeviceControl(…,7,…) needs work to support redundancy.

 

Appendix: Typical modem profiles for various modem & PLC.
 

Modem profile for the SAIA PLC end:

 

USRobotics Sportster Voice 33600 Fax NVRAM Settings...

 

 Template Y0

 

   DIAL=TONE   B0  E1  F1  M1  Q0  V0  X4

   BAUD=19200  PARITY=N  WORDLEN=8

 

   &A0  &B1  &C1  &D0  &H0  &I0  &K0

   &M0  &N10  &P0  &R1  &S0  &T5  &U0  &Y1

 

   S00=002  S02=043  S03=013  S04=010  S05=008  S06=002  S07=060

   S08=002  S09=006  S10=014  S11=075  S12=050  S13=000  S15=000

   S19=000  S21=010  S22=017  S23=019  S25=005  S27=001  S28=008

   S29=020  S30=000  S31=128  S32=002  S33=000  S34=000  S36=014

   S38=000  S39=010  S40=000  S41=000  S42=000

 

 

To get modems working with Citect & modbus & tapi,

go into the s registers, S15=128.

 

              

USRobotics Sportster Voice 33600 Fax Settings...

 

   B0  E0  F1  M1  Q0  V1  X4  Y0

   BAUD=1200  PARITY=N  WORDLEN=8

   DIAL=TONE   ON HOOK

 

   &A0  &B0  &C1  &D2  &H0  &I0  &K0

   &M0  &N2  &P0  &R1  &S0  &T5  &U0  &Y1 

 

   S00=000  S01=000  S02=043  S03=013  S04=010  S05=008  S06=002

   S07=060  S08=002  S09=006  S10=014  S11=075  S12=050  S13=000

   S15=128  S16=000  S18=000  S19=000  S21=010  S22=017  S23=019

   S25=005  S27=001  S28=008  S29=020  S30=000  S31=128  S32=002

   S33=000  S34=000  S36=014  S38=000  S39=010  S40=000  S41=000

   S42=000

 

 

 
Netcom 56Ultra

 

ACTIVE PROFILE:

B0 E0 L1 M1 N1 Q0 T V1 W0 X4 Y0 &C1 &D0 &G0 &J0 &K0 &Q5 &R1 &S0 &T5 &X0 &Y0

S00:002 S01:000 S02:043 S03:013 S04:010 S05:008 S06:004 S07:050 S08:004 S09:006

S10:018 S11:095 S12:050 S18:000 S25:005 S26:001 S36:007 S37:000 S38:020 S46:136

S48:007 S95:000

 

STORED PROFILE 0:

B0 E0 L1 M1 N1 Q0 T V1 W0 X4 Y0 &C1 &D0 &G0 &J0 &K0 &Q5 &R1 &S0 &T5 &X0

S00:002 S02:043 S06:004 S07:050 S08:004 S09:006 S10:018 S11:095 S12:050 S18:000

S36:007 S37:000 S40:104 S41:192 S46:136 S95:000

 

STORED PROFILE 1:

B0 E1 L1 M1 N1 Q0 T V1 W2 X4 Y0 &C1 &D2 &G0 &J0 &K3 &Q5 &R1 &S0 &T5 &X0

S00:000 S02:043 S06:004 S07:050 S08:004 S09:006 S10:018 S11:095 S12:050 S18:000

S36:007 S37:000 S40:168 S41:195 S46:138 S95:000

 

 

 

 

Disclaimer

Disclaimer of All Warranties 
SCHNEIDER ELECTRIC (AUSTRALIA) PTY LTD DISCLAIMS ANY AND ALL WARRANTIES WITH RESPECT TO SCHNEIDER ELECTRIC (AUSTRALIA) PTY LTD PRODUCTS AND THE RELATED DOCUMENTATION, WHETHER EXPRESS OR IMPLIED, INCLUDING SPECIFICALLY THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A GENERAL OR PARTICULAR PURPOSE. CITECTSCADA AND THE RELATED DOCUMENTATION ARE PROVIDED "AS IS," AND YOUR COMPANY UNDERSTANDS THAT IT ASSUMES ALL RISKS OF THEIR USE, QUALITY, AND PERFORMANCE.

Disclaimer of Liability 
YOUR COMPANY AGREES AND ACKNOWLEDGES THAT SCHNEIDER ELECTRIC (AUSTRALIA) PTY LTD SHALL HAVE NO LIABILITY WHATSOEVER TO YOUR COMPANY FOR ANY PROBLEMS IN OR CAUSED BY SCHNEIDER ELECTRIC (AUSTRALIA) PTY LTD PRODUCTS OR THE RELATED DOCUMENTATION, WHETHER DIRECT, INDIRECT, INCIDENTAL, SPECIAL, OR CONSEQUENTIAL (INCLUDING LOSS OF PROFITS).

 

 

 

 

 

 

 

 

 

Attachments