Jump to content

Gabriel Franco

Members
  • Posts

    418
  • Joined

  • Last visited

  • Days Won

    20

Posts posted by Gabriel Franco

  1. I´ve read timers from datatables using VBA in Excel using this code:

                Call CopyMemory(resultLong, DB(lAddress * ElementSize + 23), 4)
                resultSingle = resultLong / (24 * 60)
                resultSingle = resultSingle / (60 * 100)
                Workbooks(NombreArchivoDatos).Sheets("Referencias").Cells(lAddress + lRowReadIndex + 2, 4) = resultSingle
                Workbooks(NombreArchivoDatos).Sheets("Referencias").Cells(lAddress + lRowReadIndex + 2, 4).NumberFormat = "[hh]:mm:ss.00"
     

    lAddress and ElementSize depends of RAM address of specific datatable you want to read from PLC.

  2. 3 hours ago, Ausman said:

    Are you SURE you have the wiring correct for NPN or PNP and ALSO have the NPN/PNP selection done correctly in the Project's Hardware Configuration? 

    The PNP/NPN selection is in the left column of the Digital Inputs Tab in Hardware Configuration and is easily missed.  Once done, you must compile this, save as new, reload it into the controller and do an Init and Reset.

    I also notice in the photos that it looks like you are only using one input on the AI8.  You could perhaps get rid of this module completely by using the AI on the D16A3.

    cheers, Aus

    I just realized that npn/pnp field exists.  I never had to change it before. Is it really relevant or just to visual indication?

×
×
  • Create New...