Results 1 to 1 of 1
  1. #1
    Join Date
    Oct 2003
    Posts
    1

    Unanswered: Debugging Help Needed

    Well, the day is going well. I failed to post the correct extension and my posting was wiped out......

    I am at an intermediate level with Access 97 in general and on a very basic level with VB. The code you will see in the attached zip file was mostly taken from a like database currently in production.

    I have a form in this database. The form name is PLCLogger. Below each check box is a label. The labels have no caption. Rather the captions are filled in based upon a condition. The program communicates via DDE. DDE pulls in data from a RJ-45 compliant card plugged into a Siemens PLC base. I realize some of this may be boring, but I am trying to present a full picture. Anyways, code in the program is constantly checking via the card in PLC base to see if equipment is running or turned off. Is equipment is running, then I want to pull in the data, otherwise don't collect data. So the caption should indicate to me, "Equipment is running" or "Equipment is not running". Problem is I am getting nothing in the caption at all. Here is the code that is repsonsible for filling in the caption. The rest is the zip file. As mentione go the PLCLogger form and from there you should see the rest of the code.

    'Check to see if Dk Kettle is running via Stucco Feed Screw
    If DDERequest(ctiLink, "V9023") = 1 Then
    lblDkKetl.Caption = "Dark Kettle is Running"
    DDETerminate (ctiLink)
    DDETerminateAll
    Set ctiLink = Nothing
    Exit Sub
    Else

    If DDERequest(ctiLink, "V9023") = 2 Then
    lblDkKetl.Caption = "Dark Kettle is Down"
    End If

    'Check via Dark Raymond Mill is running via Feed Bin Screw
    If DDERequest(ctiLink, "V9022") = 1 Then
    lblDKRM.Caption = "Dark Raymond Mill is Running"
    lblDkDryer.Caption = "Dark Stucco Dryer is Running"
    DDETerminate (ctiLink)
    DDETerminateAll
    Set ctiLink = Nothing
    Exit Sub
    Else

    If DDERequest(ctiLink, "V9022") = 2 Then
    lblDKRM.Caption = "Dark Raymond Mill is Down"
    lblDkDryer.Caption = "Dark Stucco Dryer is Down"

    End If

    plcTime = Now
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •