AutomationDirect Technical Support
AutomationDirect | Direct Sales in US and Canada | 1-800-633-0405

OPC/DDE server Frequently Asked Questions AutomationDirect Logo


Use "Ctrl-F" to search for specific words in this FAQ.

Question:

Which file contains the DSData link info?

Answer

dsdata.rst

FAQ ID: 248



Question:

Can the override bits be accessed via the DDE server V1.7?

Answer

No.

FAQ ID: 250



Question:

How do I make my Visual Basic application delay before start up of DSDATA on a boot up of my PC?

Answer

There is a utility called DSSTART on Host engineering's website http://www.hosteng.com. This will allow you to choose an application to delay on start up and will also allow you to choose the amount of delay for that start up.

FAQ ID: 472



Question:

Can DSdata and DirectSoft work together?

Answer

Yes, but both must be the same version.

FAQ ID: 559



Question:

Does DSdata communicate using Modbus?

Answer

No.

FAQ ID: 672



Question:

Do you need DirectSoft to run DSdata?

Answer

No.

FAQ ID: 723



Question:

Q: Is there an ASCII translation for DSDATA?

Answer

A: No.

FAQ ID: 794



Question:

Q: What is the max message size DSDATA will request?

Answer

A: The max message length on data server is 128 bytes.

FAQ ID: 795



Question:

With DsData 4.0 connected to a PLC, I want to be able to store data in integer variables within a Excel visual basic macro so I can manipulate them before placing the values into the spreadsheet.

Answer

The following macro should work:

Sub GetSomeData()

Channel = DDEInitiate("dsdata", "topic")
Fred = DDERequest (Channel, "V7747") 'V7747 was picked because in most DL PLCs this is a changing clock value.

'A little known fact is that the DDERequest returns an array data type. So now Fred is an array.

Cells(1, 1) = Fred 'Displays the value from V7747 in Cell A1.
Wilma = Fred(1) + 1000 'To use Fred in an expression, you must use its array form.
Cells(2, 1) = Wilma 'Displays the new value in A2.

DDETerminate (channel)

End Sub

Every time this macro is executed, the variable "Fred" will have data in it from V7747 in the type of an array. Then using it like an array, you can use it in an expression before outputting it to a cell.

Host Eng.
support@hosteng.com

FAQ ID: 952



Question:

What causes "data error" in "Link info?"

Answer

DS Data thinks it is actually wrong data (i.e. wrong length, wrong character).

FAQ ID: 955



Question:

Does DS Data support Wonderware's Fast DDE?

Answer

Yes it does.

FAQ ID: 957



Question:

What version of OPC does DS Data support?

Answer

OPC v1.1

If you need v2.0 or greater please refer to KEPware or another OPC/DDE server with the desired drivers.

FAQ ID: 958



Question:

Attempting event-based data logging with DSDATA. When Excel cell data changes, I want to start data logging. Can you offer any hints?

Answer

There are two types of cell data changes (1) Editing the cell; (2) Non-editing cell data change.

(1) EDITING THE CELL - If the cell data changes based on an Excel edit, then Excel has a Visual Basic subroutine called "Worksheet_Change" that gets executed every time an edit occurs in Excel.
1. Select Tools --> Macro --> Visual Basic Editor.
2. In the “Project – VBAProject” window at left, double-click on “Sheet1 (Sheet1)” to open it up.
3. In the “General” combo box at the top left of this now open Sheet1, select “Worksheet.”
4. In the combo box at the top right select the subroutine called “Change.”
5. Now enter this sample code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cell As Range
For Each cell In Target.Cells
If cell.Row = 1 And cell.Column = 1 Then
MsgBox "cell changed to " & cell.Value
End If
Next cell
End Sub
6. After entering the code, then, of course save it.
7. Switch back to the Worksheet view (normal Excel view).
8. Now if you edit Cell A1, you will get a message box (e.g. “cell changed to ”).
This is just a sample. It is used to fire up a message box, but it could be used to execute a macro.

(2) NON-EDITING CELL DATA CHANGE - If the cell data changes based on something other than an Excel edit (e.g. macro changes it; value read from PLC changes it) then Excel has a Visual Basic subroutine called "Worksheet_Calculate" that gets executed every time Excel recalculates all its formulas:
1. Select Tools --> Macro --> Visual Basic Editor
2. In the “Project – VBAProject” window at left, double-click on “Sheet1 (Sheet1)” to open it up.
3. In the “General” combo box at the top left of this now open Sheet1, select “Worksheet.”
4. In the combo box at the top right select the subroutine called “Caculate.”
5. Now enter this sample code:
Private Sub Worksheet_Calculate()
MsgBox "cell changed to " & Cells(1, 1).Value
End Sub
6. After entering the code, then, of course save it.
7. Switch back to the Worksheet view (normal Excel view).
8. Now if the data in Cell A1 changes, you will get a message box (e.g. “cell changed to ”).
This, too, is just a sample. It is used to fire up a message box, but it could be used to execute a macro.

FAQ ID: 959



Question:

On DSDATA, I'm attempting to use two NICs in my PC, getting CSMain error.

Answer

Edit the ds300.ini/ds400.ini file and disable COM settings and retry. If it works, there is a conflict with the COM ports. If it doesn't work, edit the files again disabling Ethernet links. If it works, then there is a conflict between the NICs. You may want to look at our app note on comm probblems here: http://support.automationdirect.com/docs/an-ds-002.pdf

FAQ ID: 960



Question:

What if I want to use DS Data on multiple machines?

Answer

License agreement states you can install it on multiple machines, but can only have one PC actively using it. Therefore to use on multiple machines, multiple copies of DS Data should be purchased.

FAQ ID: 961



Question:

How can I speed up the data throughput of my DS Data application?

Answer

1. If using serial communication, then use fastest possible baud (bps).
2. Use an ECOM instead of serial connection . . . much faster.
3. Creating Subtopics in DS Data will allow you to assign different update intervals, thus enabling you to prioritize, thus increasing throughput on higher priority Items.
4. Win95, Win98, WinME operating systems are terribly slow; therefore use WinNT, Win2K or WinXP, these are sometimes 10x faster.
5. If using ECOM, give it an isolated network if possible, as network traffic can effect data through-put.
6. Use fastest PC possible.
7. Use asynchronous reads as opposed to synchronous reads in your application code.
8. Each write is handled individually, therefore if writing to individual bits it is better to group them together and write once to the imaged V-memory of the PLC instead of each bit having its own write. For example, if using DL260 CPU, instead of writing to C0, C1, C2 individually, set these bits in a word and write the single word to V40600 where C0, C1 and C2 are imaged. (See user manual for the mapping for each DL CPU).
9. Each read is grouped automatically by DS Data whenever it can. Therefore, if possible when doing reads, group your data in contiguous blocks.
10. Creating Items manually in DS Data cuts down on execution code in DS Data because the Item only gets created once (manually by you) as opposed to being created every time per request when memory references are used. Therefore, Creating Items (e.g. "Fred") and using them in the DDE/OPC reference instead of using memory references (e.g. "V2000") will speed up data throughput.
11. ECOMs do at least 1 comm cycle of approximately 128 bytes per PLC scan, but in faster CPUs it can do as many as 3. So using a faster PLC CPU (e.g. 260 instead of a 240) will help.
12. Since the ECOM comm cycle is PLC scan dependent, then anything you can do to make the PLC scan faster will help.
13. Make sure no other applications or devices are talking to the same PLC via the same ECOM or serial port (e.g. like having DS Programming doing status while DS Data is running, or PLC doing/responding to RX/WX from other PLC). There is only so much bandwidth between the serial port/ECOM and the CPU itself.
Measuring the speed:
· In DS Launch if you click on the link that is being used in DS Data you can see the Comm Rate in comms per second. This shows the communication rate between DS Data and the PLC.
· In DS Data there is an Item that is called _XferRate. This Item shows the same information as the DS Launch Comm Rate display.
· In DS Data go to View --> Link Info... and this will pull up a window that shows the transfer rate as well as other useful data (e.g. error log).
· In DS Data if you click on the box beside a particular Item you are using in your client, an "L" (for Log) will be put in the box and DS Data will ask if you want to start the DBWin32 logger application. If you start this application, then it will print lines in the DBWin32 logger window that are time stamped. You can then measure the time between requests for that Item from the client using DS Data. This shows the communication rate between the client and DS Data.

FAQ ID: 962



Question:

How to copy or save a DS Data "project?"

Answer

COMMSERV.RST contains the link information; DSDATA.RST contains the topic information.

FAQ ID: 963



Question:

Does the OEM License version of DS Data allow me to send a copy of DS Data to customer's PC as part of his application I am writing?

Answer

Yes. DS Data OEM is for distribution with PCs sold as part of your customer's application.

FAQ ID: 964



Question:

DS Data has a nickname for an element that does not show up in the DirectSoft project.

Answer

Since nicknames are first created in DirectSoft then the correct project must not be loaded. Reload DirectSoft project.

FAQ ID: 966



Question:

Upon starting DS Data, get "Critical error 1004 invalid INI file."

Answer


  1. Can't find its DS400.INI file

    To make sure DS Data can find the file use Start --> Run and type in "DS400.INI" and press the button. This should pull up the DS400.INI file in a default text editor (e.g. NotePad). If you get an error here then first try reboot the PC and try again. If it still doesn't work uninstall DS Data and reinstall.
  2. The DS400.INI file is invalid.

    Pull up the DS400.INI file using Start --> Run and type in "DS400.INI" and press the button.

    Look for "strange" or missing lines in the file. If there are any it is best to delete the file entirely and then uninstall DS Data and reinstall. You could try to edit it yourself and eliminate the problems in the file, but this would be at your own risk.

    If none of the above works use the Search function on your PC and find all occurrences of the DS400.INI file; delete them; uninstall DS Data and reinstall.




NOTE: On a Win2K Server, the DS400.INI file must be in the Administrator's WinNT folder.

FAQ ID: 967



Question:

Does DS Data via Ethernet require IPX or can it run only on TCP/IP?

Answer

DS Data does not require IPX (if you have v4.0 Build 18). Earlier versions used an older CommServer that had some issues with not having IPX protocol loaded.

FAQ ID: 968



Question:

Can DS Data be set up to use a different IPX network number?

Answer

No, DS Data only uses IPX network number 0000 0000. Any other number and it won't talk.

FAQ ID: 969



Question:

Is there any way to define a single Item to address a block of V-memory within DSDATA?

Answer

Unfortunately this is not possible with DS Data and the ECOM. It was an engineering decision given the then pros and cons. There must be a one-to-one correspondence between PLC data types and OPC/DDE reference types. So the problem begins with the fact that there's no block (or array) data type in the Direct Logic (DL) PLCs sold by Automation Direct. Without this data type in the PLC, there's no way for any DDE/OPC client to create an Item that can reference a range of data in the PLC.

FAQ ID: 970



Question:

Can remote PC get data from DS Data running on local PC?

Answer

No, not directly. However, if the application running on the local PC has the ability, it could share the data with the remote PC, but this is a function of the local application getting data from DS Data and not a function of DS Data itself. But DS Data was not designed for remote access, nor has it ever been tested this way. It's licensed to run on a single PC and provide a data connection to one or more applications on that PC.

FAQ ID: 972



Question:

What are the restrictions on characters used in user-created Item Names?

Answer

DS Data's restrictions for Item Names are as follows:
1. The first character must be an alphabet or underscore (A-Z, a-z or _)
2. Must not be a valid PLC address (e.g. V40400).
3. Must be unique.
4. Must not be empty.
5. The client accessing DS Data may have further restrictions on length and other

FAQ ID: 973



Question:

Will DS Data work with NetDDE?

Answer

NetDDE was used in the days when DS Data was a 16-bit application running on Win95. However, even then, Host was never able to get this reliably working.

FAQ ID: 974



Question:

How do I access a DSDATA subtopic in Visual Basic?

Answer

Like this::

In Excel:
=DSData|TopicName!SubTopic.v1510

In Visual Basic (the subtopic is actually part of the item, so it is referenced on the .LinkItem property):
Test.LinkTopic = "DsData|TopicName"
Test.LinkItem = "SubTopic.V1510"
Test.LinkMode = 1

FAQ ID: 975



Question:

Can DS Data be run as a service, or work with a client that is a service?

Answer

DS Data is not a service application. If the OPC client talking to DS Data is a service, it probably won't talk (will get errors). A WinNT service typically runs regardless of the login. And a WinNT service typically has two separate components, a user interface and a runtime. DS Data has its GUI and runtime unified in a single application. Changing this would be a huge (read prohibitively expensive) undertaking. We've tried a few of the "run any executable as an NT service" programs with little success. The unified interface kills it.

FAQ ID: 976



Question:

Have a PC using Matrikon OPC Explorer and DS Data talking to 60 ECOMs. Is there a way to add a new ECOM without having to restart DS Data?

Answer

No. There is no way to do anything to a DS Data Topic while any Topic is being accessed. Must restart

FAQ ID: 977



Question:

Upgraded from DS DDE Server to DS Data. Now my client gets error: "Remote data not accessible" and then asks to start DDE. Reference line says "REF" which according to the manual means "DS Data Server is not running."

Answer

The reason for this is that DS DDE Server and DS Data have different ServiceNames. DS DDE Server's ServiceName is "DSDDE." DS Data's ServiceName is "DSDATA." Thus there are two solutions to get links working again:
· Modify client's reference of the ServiceName from "DSDDE" to "DSDATA".
· Edit the ds400.ini file and under the heading "[DSData]" change the "ServiceName=DSDATA" to "ServiceName=DSDDE"
If you choose the second option above, then by restarting DS Data you will cause it to now have a ServiceName of "DSDDE" and all the links and tags created for DS DDE Server will now work.

FAQ ID: 978



Question:

Do you have any examples of how to use Microsoft Access with DS Data?

Answer

No. However in Microsoft Access you can use the Visual Basic editor to write code to access DS Data. This is described in Chapter 5 of the manual

FAQ ID: 979



Question:

Is it possible to enable and disable a link in DS Data using Visual Basic?

Answer

Yes. This is described in Chapter 5 of the DS Data manual. The procedure starts on page 5-8 entitled "Using Subroutines To Read and Write Data." In this procedure instead of setting the LinkItem equal to a memory location in the PLC, set it to "Enable." This Item is one of the many that DS Data predefines for every link created. By writing a "1" to Enable the link is accessible, by writing a "0" it is disabled.

FAQ ID: 980



Question:

Trying to access DS Data; get "Remote data not accessible, start application DSDATA.exe" and then "Cannot run DSDATA.exe, one of its components or files are damaged or missing," or "DSData failed to communicate, one of its components is damaged or missing."

Answer

Probably one of the following problems:
1. DS Data has not been started before the application.
2. DS Data has to be started first and also given enough time to establish its links before the application is started.
3. The Service name has a typo or is totally wrong (compare it to what is listed in the ds400.ini file.)
4. The Topic name has a typo or is totally wrong or missing entirely.

FAQ ID: 981



Question:

Why can't v3.0 and v4.0 of DS Data be installed on the same PC?

Answer

Because both v3.0 and v4.0 of DS Data have a Service name called "dsdata." And on a given PC, only one name can be registered as an OPC Service name. Thus when you are installing v4.0 it will ask you to uninstall v3.0.

FAQ ID: 982



Question:

Can't get OPC Client to browse OPC Items in DS Data.

Answer

Browsing was added to v3.0 Build 62 and all Builds of v4.0. You are probably using an older version.

Upgrade or your OPC client requires a higher version of OPC compliancy.

FAQ ID: 983



Question:

Can't get the Iconix OPC Client to browse to OPC Items in DS Data.

Answer

Last we checked, Iconix supports OPC v2.0. DS Data is only compatible with OPC v1.0a. Also, DS Data is not on Iconix's list of compatible servers:
http://www.iconics.com/products/opcserverList.asp

FAQ ID: 984



Question:

Can an SQL Server get data from DS Data?

Answer

The real question is can your SQL Server support DDE or OPC? If so, then, of course, you can get data directly from DS Data

FAQ ID: 985



Question:

DS Data works at first, but then after a while it locks up and my client can no longer get data from it.

Answer

This is probably caused by the client asking DS Data for too much data too fast. Slow its access intervals and this should remedy the problem.

FAQ ID: 986



Question:

What is DBWin32 application on DSDATA?

Answer

It is a debugging tool used to troubleshoot and log vital information for applications like DS Data and DirectSoft Programming.
With DS Data it can be utilized in two ways:
· FOR LOGGING ITEMS: After starting DS Data, DBWin32 can be invoked by pressing the "Launch Logger" button and is commonly used to record data for particular Items that you may want to log. By clicking on the empty box beside the particular Item you are interested in and causing an "L" to appear, the transactions for that Item will be recorded in the DBWin32 window. Then the file can be saved for review later.
· FOR TROUBLESHOOTING PROBLEMS: More detailed troubleshooting information can be obtained, however, closing down DS Data, then editing the DS400.INI file. In that file under the heading [devasync.dll] you should add a line that says Dump=1 (It may already be there. If it is, then, by default, it usually is preceded by a ";". If it is just remove the ";" from in front of it.). Then start DBWin32 (Start --> Programs --> DirectSOFT4 --> DirectSOFT4 Program Tools --> DBWin32 Logger). Lastly start DS Data. Now the window will fill with messages. You can then save this data to a text file and send it to Automation Direct or Host Engineering for help in troubleshooting.
With DirectSoft Programming it can be utilized for troubleshooting only. Follow the same procedure as above except, of course, start DirectSoft Programming instead of DS Data. When you start the applications (e.g. DS Data, DirectSoft Programming) you may be asked if you are sure you want to dump information in the logger. Just answer "Yes."

FAQ ID: 987



Question:

Can I get data from KEPdirect or DSDATA into a MS Access database?

Answer


Not directly, but you can use something like the Rensen OPC Office link
to act as an intermediary between our OPC servers and Access.

FAQ ID: 1059



Question:

Where can I find troubleshooting information for KepDirect

Answer

You can try KepWare Knowledgebase

FAQ ID: 1116



Question:

I installed the KEPDirect software but Purchase a Driver License under Help is grayed out. How do I license the drivers?

Answer

a. Most likely, none of the drivers where selected in the Select Components section during installation.

b. KepDirect needs to be uninstalled. During installation, make sure to check the drivers and components you need. At least one driver must be selected.

c. Purchase a Driver or Plug-in under Help will now be available.

d. View step 7 of installation on page 8 of the KEPDirect for PLC user manual .

FAQ ID: 1207



Question:

Do I need a serial number to install KEPDirect?

Answer

a. Yes. The KEPDirect CD case has a label with two key codes.
i. To be able to install the software, enter the PC-KEPDIRECT-INSTALL product key code.
ii. To license the drivers, start the software, go to HELP and select Purchase a Driver License. You will select one of the drivers in the Unlicensed Drivers and Plug-ins window, press the License button and enter the key code that starts with 900-…..
iii. This information is covered in Step 12 on page 14 of the KEPDirect for PLC user manual .

FAQ ID: 1208



Question:

Can KepDirect and DirectSoft use the same communications port simultaneously?

Answer

a. No. They both take over a communications port. If KepDirect is accessing the communications port DirectSoft will not be able to access it and vice versa.

FAQ ID: 1209



Question:

How can I test my project if I do not have an OPC or DDE client?

Answer

a. KepDirect installs with the OPC Quick Client utility.
b. Once KepDirect is configured, run the OPC Quick Client from the Tools menu.
c. Look for the item names you want to monitor and verify you are getting data.
d. This tool allows you to log errors and works well for troubleshooting connections to our PLC’s.

FAQ ID: 1210



Question:

How can I access data using my Visual Basic application?

Answer

a. Visual Basic OPC examples are installed in the KEPDirect OPC Servers example folder.
b. These are fully documented.
c. Automation Direct does not support these examples and does not assist in programming of third party applications.
d. Kepware Technologies may have additional examples for their full version, KEPServerEX. Their technical support may answer general questions but they do not support VB applications.
e. Click here for additional VB information from KEPWare.

FAQ ID: 1211



Question:

How can I access PLC data using Excel?

Answer

a. DDE link in cell allows reading data from one item in KepDirect. This is the format for a DDE link in an Excel cell: =kepdirectdde|_ddedata!channel.device.tag

FAQ ID: 1212



Question:

Why do I get an error when trying to license the server on Windows Vista?

Answer

a. Licensing Kepware products (including KepDirect) on Vista requires either that the user is logged into the PC with Admin privileges, or that the Server be run as an Administrator

FAQ ID: 1214



Question:

Does KepDirect run on Windows Vista?

Answer

a. Yes, it does run on Windows Vista.
b. Click here for instructions on how to use KEPware product on Windows Vista.

FAQ ID: 1215



Question:

Can the KEPDirect product connect to a Click PLC?

Answer

No, the KEPDirect product does not have a Modbus protocol option.

You can get a version of the KEPServer package from www.kepware.com that includes a Modbus driver.

FAQ ID: 1241



Question:

WonderWare/DDE clients can't communicate to KepDirect Ver 5.x. How do I correct this?

Answer



    Version 5.x does not run in the "Interactive mode" that previous versions did, it now runs as a Service. To change so that Wonderware or DDE clients can connect, do the following:


    If customer didn't enable it at first install ( most miss this), start the KEP installation again:
  1. Select "Modify"

  2. Expand the "Communications Server" to show "Native Client Interfaces"

  3. Expand "Native Client Interfaces", then select "Dynamic Data Exchange" ( for DDE/spreadsheet) or "Wonderware SuiteLink" and select "Will be installed on local hard drive".
  4. Click Next, and finish the installation. It may be necessary to reboot.

  5. Go to Taskbar icon, right-click, select Settings, then click "Runtime Process" tab, set "Selected Mode" to "Interactive", then apply and reboot

  6. Open Configuration with working project, go to File>Project Properties, select DDE or FASTDDE tabs as required, enable both, and note the Appliation Name or Service Name, change as necessary.



    If users are doing DDE, the proper formula format is "=(Application Name)|(Topic)!(Item)".



    =kepdirectdde|_ddedata!channel1.device1.V7766 ( note the underscore "_ddedata"….). Using the Excel Formula DEC2HEX converts the value into seconds,



    Application Name: By default, this is set to "Kepdirectdde".


    Topic: The global topic is "_DDEData". ( note the underscore "_ddedata"….)


    Item: When using the global topic, this is the same as an OPC item name. It will be "channel.device.tag".

    FAQ ID: 1531




Copyright © 1999- AutomationDirect.com. ALL RIGHTS RESERVED