Author Topic: Driver Siemens with Snap7  (Read 6156 times)

aquilmustafa

  • Full Member
  • ***
  • Posts: 121
    • View Profile
Re: Driver Siemens with Snap7
« Reply #15 on: May 15, 2021, 08:45:42 AM »
Hi All,

My S7-1200 PLC Project has MW and MD variables instead of DB1.DB0 format. How can i use it?

Please guide me as to how I can accommodate this into existing project.

tatin

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Driver Siemens with Snap7
« Reply #16 on: May 16, 2021, 07:43:24 AM »
Hi, try changing DB1.DB to M: M0.0, MB0.0, MB0, MW0, MD0, ...  same with I(input), Q(output)

tatin

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Driver Siemens with Snap7
« Reply #17 on: May 16, 2021, 08:02:46 AM »

aquilmustafa

  • Full Member
  • ***
  • Posts: 121
    • View Profile
Re: Driver Siemens with Snap7
« Reply #18 on: May 18, 2021, 11:24:37 PM »
Thanks a lot Tatin. I'll go through it and comeback to you.

lunenburger

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Driver Siemens with Snap7
« Reply #19 on: May 20, 2021, 07:01:24 AM »
Thank you Godfra and Tatin for the help with this driver..... it is greatly appreciated.

I have been using the ControlLogix driver, and I have been creating the code:

Code: [Select]
Dim BottomMotorSpeed As Integer = EthernetIPforCLXCom1.Read("BottomMotorSpeed")


Is there a comparable function in the Siemens driver to the EthernetIPforCLXCom1.Read?

Or do I have to do something like the following:

Code: [Select]
Dim recipesteps As Integer

        If e.PlcAddress = "MW10" Then
            recipesteps = e.Values(0)
        End If

Thank you again for the help....

tatin

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Driver Siemens with Snap7
« Reply #20 on: May 20, 2021, 09:13:42 AM »
Hi, this functionality is not implemented in the driver, as it is based on Snap7, only the memory addresses can be accessed.

MEDALI1TN

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Re: Driver Siemens with Snap7
« Reply #21 on: July 16, 2021, 04:41:18 AM »
Hello Tatin,
can you please write a simple code (for a beginner) how can i read a value from PLC using the driver.
The example of siemens variables :
(DBxxxx,DDxxxx)
(DBxxx,Dxx.x)
(Exxxx.x)
(PEWxxxx)

tatin

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Driver Siemens with Snap7
« Reply #22 on: July 20, 2021, 11:24:39 AM »
Hello, it is not necessary to write code to read a value from the PLC, you just have to open the example project, add the SiemensCom driver as explained by a colleague previously, insert a BasicLabel on the screen and finally put in the property PLCAddressValue for example DB1.DBW0. Well, don't forget to put the SiemensCom driver in the ComComponent property. As well as assigning the IP address to the driver.
In the source code of the driver are all the possible examples for DBs, but also if you change DB1.DB to M, I, Q you can access these memory areas.
Bear in mind that this driver forces you to define access to a DB as not optimized or something like that in the TIA Portal project.
I hope I have helped you with your question ...
Greetings...

ScottM

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Driver Siemens with Snap7
« Reply #23 on: June 14, 2022, 04:23:10 AM »
I know this thread is almost a year old but had there been any more development on this driver? Has it been tested with S7-300? As our company has been growing over the years all our new equipment has been coming in from Germany and its all Siemens..

Thanks

tatin

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Driver Siemens with Snap7
« Reply #24 on: June 19, 2022, 04:19:37 PM »
I'm sorry but I have not used the driver again, it should work with the S7-300 but keep in mind that I have not tested it much, test it well because it may have errors because I am not an expert programmer.

Noe

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Re: Driver Siemens with Snap7
« Reply #25 on: June 21, 2022, 01:28:33 PM »
I know this thread is almost a year old but had there been any more development on this driver? Has it been tested with S7-300? As our company has been growing over the years all our new equipment has been coming in from Germany and its all Siemens..

Thanks

I've been using the Modbus driver succesfully but with S7-1200 and S7-1500 and works pretty well, with almost all the functionallity of all the other drivers. I do not know if S7-300 supports it. You only have to write code in VB to convert values that are not integers, like strings. I can share some code I used if want.