Applies To:
  • CitectSCADA 5.xx, 6.00
  • CitectHMI 5.xx, 6.00

Summary:
I need to set two different device specific parameters, but both devices use the same driver. The driver does not allow me to set this parameter at the device level. Is there a way around this?
Take for instance the Modnet driver?
 

Solution:
There is a work around to this problem.

You can create another instance of the Modnet driver. And thus use whatever Modnet protocol parameters you wish for each instance of the driver. Here are the instructions on how to do it:

1. Edit Protdir.dbf file.
Add the following line directly under the Modnet entry (insert new line):
MODNETX MODNETX 1920 1920 0x37f
Note: You cannot use numeric numbers for the new MODNET instance name, only alphabet characters.

2. Edit the ProtErr.dbf file.
Add the following line directly under the Modnet entry (insert new line):
1 MODNETX Alias

Also these lines further down:
MODNETX 0 0x001C Bad response from PLC
MODNETX 0 0x100 Mismatch Gateway Point-To-Point
MODNETX 0 0x2100 Function code mismatch in reply
MODNETX 0 0x2101 Invalid BCD number
MODNETX 0 28 Bad response from PLC

3. Edit the Help.dbf file.
Add the following line directly after the Modnet entry:
PROTOCOL MODNETX

You should use the save_dbf.xls macro to save and close each of these files to avoid corruption.

4. Now copy and rename modnet.dll and modnet.dbf to modnetx.dll and modnetx.dbf.

5. Pack and compile your project.

6. You must create a unique port for each I/O Device that uses each driver. For instance, Port1 for Modnet protocol. And Port2 for Modnetx protocol.

7. You can now set the protdir.dbf BIT_BLOCK and MAX_LENGTH parameters for each protocol. I.e. one set of parameters for Modnet, and one for Modnetx.

8. You can also now use the Modnet protocol parameters in the Citect.ini. I.e. you can use [Modnet]Block=250 and [Modnetx]Block=5.

Citect will actually load 2 instances of essentially the same driver.

Again note that you must have a unique port for each Driver instance, otherwise you will get an error on startup from Citect.

You can check in the Kernel under Units, that each protocol is loaded with the appropriate parameters.

NOTE: This workaround solution is no longer suitable for drivers that have been built since the start of 2007. However, should you require a second instance of a particular Citect driver, you can request that Citect rebuild a second instance for you. Please contact Citect Support for further information.

Further to this most MODNET ini parameters can be set on a per port basis.

 

Keywords:
Modnet, driver, protdir, parameters  

Attachments