Author Topic: Siemens S7 driver  (Read 8128 times)

aqwsderf

  • Newbie
  • *
  • Posts: 1
    • View Profile
Siemens S7 driver
« on: June 21, 2020, 06:06:03 PM »
Hi All
I'm looking for Siemens S7 driver for communication with 1200/1500 CPU in a similar way as for AB CLX. I've found many old topics related to such kind of driver (https://www.advancedhmi.com/forum/index.php?topic=2605.0 for example), but I've not found binaries or sources here.

Could anyone help me sort out with it issue?

Thanks in advance!

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Siemens S7 driver
« Reply #1 on: June 23, 2020, 04:04:23 PM »

ScottM

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Siemens S7 driver
« Reply #2 on: January 31, 2023, 09:49:45 AM »
I use the attached driver with great success in my plant with over 50 S7-300 PLCs, So far only for machine interface and data acquisition but it seems very stable. I have not tested with a 1200 yet but I will be soon and post my findings.

(Not My Driver, I found it in the forums) If this is not allowed please feel free to delete.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Siemens S7 driver
« Reply #3 on: March 23, 2023, 02:15:49 PM »
I use the attached driver with great success in my plant with over 50 S7-300 PLCs, So far only for machine interface and data acquisition but it seems very stable. I have not tested with a 1200 yet but I will be soon and post my findings.

(Not My Driver, I found it in the forums) If this is not allowed please feel free to delete.
I see this driver is a wrapper for the Snap7 driver. Looks like a good job was done on the wrapper code. For anyone wanting to try this Siemens driver, here are the steps:

- Download and extract the 3 files
- Open the AdvancedHMI solution in VS
- In Solution Explorer expand down the AdvancedHMDrivers project
- Right click the Support folder and select Add Existing Items
- Browse to the 3 extracted files
- Change the file type filter to All Files
- Select the 2 DLL files
- With the 2 DLL files now in the Support folder, select each one by clicking once on it, then in the Properties set "Copy if Newer"

- Right click the AdvancedHMIDrivers project and Select Add Existing Item
- Browse to and select the SiemensCom.vb file

- Right click the AdvancedHMIDrivers project and Select Add References
- Browse to and select Snap7.net.dll

lpou

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Siemens S7 driver
« Reply #4 on: April 07, 2023, 05:02:00 PM »
I have to work with siemens s7-1500, what is the best easy and reliable way to do it with adhmi, and if possible?.

bachphi

  • Hero Member
  • *****
  • Posts: 671
    • View Profile
Re: Siemens S7 driver
« Reply #5 on: April 07, 2023, 10:12:03 PM »
I have to work with siemens s7-1500, what is the best easy and reliable way to do it with adhmi, and if possible?.
I think following Archie's steps is the easiest way. Any chance you can show us your way if that is possible.
« Last Edit: April 07, 2023, 10:14:30 PM by bachphi »
===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================

ScottM

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Siemens S7 driver
« Reply #6 on: May 28, 2024, 07:42:50 PM »
I can confirm the driver is very stable on the S7-1200 PLCs, I will be on the 1500s next. 8)

billerl

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Siemens S7 driver
« Reply #7 on: June 17, 2024, 07:18:20 AM »
This is awesome, nice work to everyone responsible. Does anyone know what the format for setting the plc tag address would be? Is non-optimized data blocks required? Any place to find further documentation? Hopefully this is a new add in the next version of AdvancedHMI

ScottM

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Siemens S7 driver
« Reply #8 on: October 25, 2024, 11:29:56 AM »
This is awesome, nice work to everyone responsible. Does anyone know what the format for setting the plc tag address would be? Is non-optimized data blocks required? Any place to find further documentation? Hopefully this is a new add in the next version of AdvancedHMI

All Caps, can read I/O and DB bits, words whatever you need.
 DB1.DBB0.xxx     -> bit 0..999
 DB1.DBB0         -> Number 0..255 (1 byte) <<need to implement -128..127>>
 DB1.DBB0@W       -> Number 0..255 (1 byte)
 DB1.DBW0         -> Number -32768..32767 (2 bytes)
 DB1.DBW0@W       -> Number 0..65535 (2 bytes)
 DB1.DBD0         -> Number -2147483648..2147483647 (4 bytes)
 DB1.DBD0@W       -> Number 0..4294967295 (4 bytes)
 DB1.DBD0@F       -> Float (4 bytes) NumericFormat = F
 DB1.DBD0         -> Time (4 bytes) DisplayAsTime = True and ValueScaleFactor = 0,001
 DB1.DBB0@Sxx     -> Char array of xx (xx bytes)
 DB1.DBB0@D8      -> Date and time (8 bytes)
 DB1.DBB0@D2      -> Date (2 bytes)
 M0.0, MB0.0, MB0, MW0, MD0

« Last Edit: October 25, 2024, 11:44:57 AM by ScottM »