OPC/DDE server Frequently Asked Questions
Use "Ctrl-F" to search for specific words in this FAQ.
Which file contains the DSData link info?
dsdata.rst
FAQ ID: 248
Can the override bits be accessed via the DDE server V1.7?
No.
FAQ ID: 250
How do I make my Visual Basic application delay before start up of DSDATA on a boot up of my PC?
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
Can DSdata and DirectSoft work together?
Yes, but both must be the same version.
FAQ ID: 559
Does DSdata communicate using Modbus?
No.
FAQ ID: 672
Do you need DirectSoft to run DSdata?
No.
FAQ ID: 723
Q: Is there an ASCII translation for DSDATA?
A: No.
FAQ ID: 794
Q: What is the max message size DSDATA will request?
A: The max message length on data server is 128 bytes.
FAQ ID: 795
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.
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
What causes "data error" in "Link info?"
DS Data thinks it is actually wrong data (i.e. wrong length, wrong character).
FAQ ID: 955
Does DS Data support Wonderware's Fast DDE?
Yes it does.
FAQ ID: 957
What version of OPC does DS Data support?
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
Attempting event-based data logging with DSDATA. When Excel cell data changes, I want to start data logging. Can you offer any hints?
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
On DSDATA, I'm attempting to use two NICs in my PC, getting CSMain error.
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
What if I want to use DS Data on multiple machines?
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
How can I speed up the data throughput of my DS Data application?
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
How to copy or save a DS Data "project?"
COMMSERV.RST contains the link information; DSDATA.RST contains the topic information.
FAQ ID: 963
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?
Yes. DS Data OEM is for distribution with PCs sold as part of your customer's application.
FAQ ID: 964
DS Data has a nickname for an element that does not show up in the DirectSoft project.
Since nicknames are first created in DirectSoft then the correct project must not be loaded. Reload DirectSoft project.
FAQ ID: 966
Upon starting DS Data, get "Critical error 1004 invalid INI file."
FAQ ID: 967
Does DS Data via Ethernet require IPX or can it run only on TCP/IP?
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
Can DS Data be set up to use a different IPX network number?
No, DS Data only uses IPX network number 0000 0000. Any other number and it won't talk.
FAQ ID: 969
Is there any way to define a single Item to address a block of V-memory within DSDATA?
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
Can remote PC get data from DS Data running on local PC?
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
What are the restrictions on characters used in user-created Item Names?
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
Will DS Data work with NetDDE?
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
How do I access a DSDATA subtopic in Visual Basic?
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
Can DS Data be run as a service, or work with a client that is a service?
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
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?
No. There is no way to do anything to a DS Data Topic while any Topic is being accessed. Must restart
FAQ ID: 977
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."
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
Do you have any examples of how to use Microsoft Access with DS Data?
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
Is it possible to enable and disable a link in DS Data using Visual Basic?
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
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."
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
Why can't v3.0 and v4.0 of DS Data be installed on the same PC?
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
Can't get OPC Client to browse OPC Items in DS Data.
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
Can't get the Iconix OPC Client to browse to OPC Items in DS Data.
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
Can an SQL Server get data from DS Data?
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
DS Data works at first, but then after a while it locks up and my client can no longer get data from it.
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
What is DBWin32 application on DSDATA?
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
Can I get data from KEPdirect or DSDATA into a MS Access database?
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
Where can I find troubleshooting information for KepDirect
You can try KepWare Knowledgebase
FAQ ID: 1116
I installed the KEPDirect software but Purchase a Driver License under Help is grayed out. How do I license the drivers?
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
Do I need a serial number to install KEPDirect?
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
Can KepDirect and DirectSoft use the same communications port simultaneously?
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
How can I test my project if I do not have an OPC or DDE client?
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
How can I access data using my Visual Basic application?
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
How can I access PLC data using Excel?
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
Why do I get an error when trying to license the server on Windows Vista?
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
Does KepDirect run on Windows Vista?
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
Can the KEPDirect product connect to a Click PLC?
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
WonderWare/DDE clients can't communicate to KepDirect Ver 5.x. How do I correct this?
FAQ ID: 1531