News:

  • May 03, 2024, 12:23:30 AM

Login with username, password and session length

Author Topic: DSDATA using modem to connect to PLC  (Read 38710 times)

fdwingen

  • Newbie
  • *
  • Posts: 3
DSDATA using modem to connect to PLC
« on: June 20, 2007, 03:14:21 PM »
I hope someone can help me.......
I'm using DSDATA to communicate with a Koyo PLC 06, the data I want to display in a Visual Basic program. I'm using a modem since the PLC is at a remote location which only has a Telephone line.

I set the Text Box Linkmode to 1 , the modem starts dialing but before I get the connection I get the VB Run Time Error 282 "No foreign application responds to a DDE initiate."

I set my timeouts to max in DSDATA as well as in my VB project.

Thank you for your help
and have a great day
Frank

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 5991
  • Yes Pinky, Do-more will control the world!
Re: DSDATA using modem to connect to PLC
« Reply #1 on: June 20, 2007, 08:13:17 PM »
If you were to connect to the PLC from DirectSoft using the same Comm Link that the DDE topic uses, and then fire up the VB app, the link should be up and the connection active when the VB app goes for data. Not sure if that is possible for you, but if so it could be an effective work around.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 684
  • Hmmm...
    • Host Engineering, Inc.
Re: DSDATA using modem to connect to PLC
« Reply #2 on: June 21, 2007, 11:40:58 AM »
Are you using DSData? Or DDE Server (earliest version of DSData)? I've seen similar things happen in the following cases:

  • The DDE Server (or DSData) isn't up and running yet before the VB app tries to access it. So you might have to put extra delays in the VB app before you try to access the data.
  • There is a typo in the service name "DSDDE" (or "DSDATA") in the application.
  • There is a typo in the topic name.
« Last Edit: June 21, 2007, 11:44:38 AM by Greg »
There are two types of people in the world; those that can extrapolate from incomplete data sets.

fdwingen

  • Newbie
  • *
  • Posts: 3
Re: DSDATA using modem to connect to PLC
« Reply #3 on: June 21, 2007, 09:16:13 PM »
The DSData server is running and starts to dial the number. While it connects the VB Run Time Error 282 comes. I checked the topicname DSDATA|MCS is what I called it.

I wish I could delay VB before it gives me the runtime error, or just ignore the runtime error and keep on running.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3665
    • Host Engineering
Re: DSDATA using modem to connect to PLC
« Reply #4 on: June 21, 2007, 09:26:56 PM »
I'm NOT a VB6 guy, but I remember something about saying ON ERROR GOTO NEXT (i.e. ignore errors).  Then you put your initial stuff in a loop until you don't get the error (I think you can see the quality of the DDE connection or something???)

fdwingen

  • Newbie
  • *
  • Posts: 3
Re: DSDATA using modem to connect to PLC
« Reply #5 on: June 22, 2007, 06:52:59 PM »
thank you very much for your replies, my customer is going with an Ethernet connection afterall (problem solved :) )