COM13d. [4/5]V20 Connecting a Siemens PLC S7-1500 to an SQL Database [PLC Section]

  Рет қаралды 6,528

Electrical Automation Hands-On

Electrical Automation Hands-On

Күн бұрын

Пікірлер: 31
@electricalautomation
@electricalautomation 3 жыл бұрын
Siemens released V21 on Feb.21, 2021, which likely solved the problem of the programming for S7-1200 . "The parameter "data" must be interconnected with an "Array of Byte" when using a S7-1200. A structure is not permitted. " This is talking about the "SqlReceive".data at the interface of the “LSql_Microsift” FB
@hetanhawke2354
@hetanhawke2354 3 жыл бұрын
THANKS MR . YOU ARE THE BEST
@electricalautomation
@electricalautomation 3 жыл бұрын
THANKS BRO!
@mateuszobirek9809
@mateuszobirek9809 3 жыл бұрын
I really like yours tutorial. But can you show also how to insert different data to two or more different tables in SQL database at the same time. I was trying to that but failed. I will be glad :) Thanks
@electricalautomation
@electricalautomation 3 жыл бұрын
I don't think using one command can send to different tables by using this example. But you can switch different command via [index number]. The protocol is TDS and and Send/Receive function blocks are based on the TCP/IP, the current version V20 cannot operating different tables within one command.
@monikawisniewska1588
@monikawisniewska1588 3 жыл бұрын
Hello! first of all, thank for your videos, they really helped a lot! I am having a problem with receiving data. I use the version 21 of the code in Tia Portal V16, and I have s7 1200. In the LSqlMicrosoft function code I modified so the received data is an array (data.bytes) I can sucessfully send the insert comands and observe results in my SQL Database. What I cannot do is read the received data in tia . I can see the response using Wireshark though, watching the tds protocol but no data appears in tia and dataReceived is never true. I tried to modify the data type typeUseCaseSpecificData so the tokenColumnMetaData´s size matches the bytes I see in wireshark (as described in simenes manual). Do you have an idea, what could be a problem? I see in the video that you receive data without any modifications to the code V20 and it happens after sending every command.
@electricalautomation
@electricalautomation 3 жыл бұрын
Hello, I think s7-1200 still has issue on implementing this. In the video I used S7-1500 configuration and PLCSimAdv. According the the document of the V21, S7-1200 does not support the structure in its receive buffer and its length is 8K (S7-1500 64K). As you said, you modified the received data as the bytes of the array, but still can not get successfully, so probably try a simple data and table in the SQL to decrease the data telegram length. From my personal view, there would be something out of the S7-1200 abilities which cause us cannot make it successfully. If this is a test for you, then use S7-1500 or PLCSim Adv, as shown in the video, they are no problems. As Siemens did before, every couple of months, this example got upgrade and got problems solved. Maybe Siemens will update or upgrade this example to solve the glitches soon.
@monikawisniewska1588
@monikawisniewska1588 3 жыл бұрын
​@@electricalautomation I investigated a little bit and I have realised that the response can be seen in tia but only in SqlReceive.data.bytes which is difficult to read. I suppose the program has got some part that takes care of this data and puts it to accordingly into header, tokenColumnMetaData and tokenRows so it is easier to read. Do you know where exactly does that happen so I can investigate and maybe fix my problem? I have written some code that writes the data in more approachable form into new data block but the problem is it must be modified depending on the length of the response (depends on token ColumnMetaData).
@electricalautomation
@electricalautomation 3 жыл бұрын
@@monikawisniewska1588 You could try to use a new created DB, set it as the received data and as bytes of the array. Then use this array as the RECV Buffer. Then transfer this buffer DB data to the receive buffer DB from the example program.
@sergiodelpozobernier8259
@sergiodelpozobernier8259 2 жыл бұрын
Has anyone solved the problem of receiving data from version 2.1? i have a s7-1200 plc and i can't execute commands like update or select.
@SCADAExperts
@SCADAExperts 3 ай бұрын
Please share video on Updated code by Siemens.
@electricalautomation
@electricalautomation 3 ай бұрын
Please find the download link below the video
@vvk1398
@vvk1398 2 жыл бұрын
hi i have a S71200 PLC I insert value (both int and real) to sql that is oke but when i update value that is fail, it don't change value on sql. Can you help me to solve this problem. Thanks !
@electricalautomation
@electricalautomation 2 жыл бұрын
Sorry, I am on a business trip these weeks and I am not available to check the details because the laptop is not the workstation I use for youtube.
@luisserrano1245
@luisserrano1245 2 жыл бұрын
Hi, I'm getting an 8602 erro when using the lsql block, that means it is a tcon error, which is 80C6. I already configured everything, opened port 1433 on the server and added an inbound rule in the firewll, do you know what else i can do to troubleshoot my problem?
@electricalautomation
@electricalautomation 2 жыл бұрын
Use hardware PLC and a PC installed SQL for the test. Also check the PC firewall
@tiennguyenhuu8736
@tiennguyenhuu8736 6 ай бұрын
Have you solved the problem yet? I am using plcsim advance to simulate and get the same error. If you solved this error, can you help me? Thank!
@tiennguyenhuu8736
@tiennguyenhuu8736 6 ай бұрын
@@electricalautomation I did the following instruction but i get the 8602 error (for version 3.1 Tia V17). What is the reason for this? And if I use hardware s7 1200 for the test, are there any different steps compared to the steps above? Thanks!
@cemresergenmumen543
@cemresergenmumen543 3 жыл бұрын
Hi , Firslty thanks for your videos and I really like yours videos.I want to ask something you. I have a problem on V20. When I modify "SqlConfig".enableLSql =True, directly diagnostics.status give a error 16#8605. "InstLSql_Microsoft".diagnostics.status Hex 16#8605 "InstLSql_Microsoft".diagnostics.subfunctionStatus Hex 16#8088 "InstLSql_Microsoft".diagnostics.stateNumber DEC+/- 7 How can i solve this problem? Can you help me on this topic? Thanks in advance.
@electricalautomation
@electricalautomation 3 жыл бұрын
Please check the COM13.b kzbin.info/www/bejne/aKjTd4V7jtN9hrs, I discussed #8088. You'd better use S7-1500. Likely this example does not fully compatible with S7-1200 evenif you are using V4.4.
@faridviko
@faridviko 3 жыл бұрын
hi is that possible to use one laptop for SQExpress and TIA Portal? so there are 1 laptop has sqlexpress and tia portal in it and 1 s7-1200 PLC
@electricalautomation
@electricalautomation 3 жыл бұрын
As long as TIA Portal compatible with SQLExpress. But if you are using PLCSim to simulate PLC for this test, it won't work, because it is using TCP/IP.
@faridviko
@faridviko 3 жыл бұрын
@@electricalautomation hi thank you for your explanation. I got another question, how do log data from DB to ms SQL using insert command?
@electricalautomation
@electricalautomation 3 жыл бұрын
@@faridviko Sorry, not quite understand your question. As you can see at 12:00 in the video, the command is using ""Insert"
@faridviko
@faridviko 3 жыл бұрын
@@electricalautomation I mean, I have a datablock DB at TIA portal that I want to put it at SQL command. how can we write that using "insert"?. let say "insert into PLCDB values (5,6). I want to to change values 5 and 6 with datablock values.
@electricalautomation
@electricalautomation 3 жыл бұрын
@@faridviko Please watch carefully about the videos on this topic COM13a. [1/5]Connecting a Siemens PLC(S7-1200/S7-1500) to an SQL Database [SQL Section] kzbin.info/www/bejne/nIOuhaSlg7CWjrc COM13b. [2/5]V11 Connecting a Siemens PLC(S7-1200/S7-1500) to an SQL Database [PLC Section] kzbin.info/www/bejne/aKjTd4V7jtN9hrs COM13c. [3/5]Sending INT and Real from S7-1200 to an SQL Database [Programming Section] kzbin.info/www/bejne/j2HFfXymo9qHh68 COM13d. [4/5]V20 Connecting a Siemens PLC S7-1500 to an SQL Database [PLC Section] kzbin.info/www/bejne/oHXJY558Z8x3q8k COM13e. [5/5]V20 Connecting a Siemens PLC S7-1500 to an SQL Database [SELECT WHERE] (Wireshark)kzbin.info/www/bejne/kGnIpatoncSjj9k
COM13c. [3/5]Sending INT and Real from S7-1200 to an SQL Database [Programming Section]
39:41
COM13a. [1/5]Connecting a Siemens PLC(S7-1200/S7-1500) to an SQL Database [SQL Section]
31:43
Electrical Automation Hands-On
Рет қаралды 36 М.
Как мы играем в игры 😂
00:20
МЯТНАЯ ФАНТА
Рет қаралды 3,4 МЛН
Win This Dodgeball Game or DIE…
00:36
Alan Chikin Chow
Рет қаралды 44 МЛН
Inside Out 2: ENVY & DISGUST STOLE JOY's DRINKS!!
00:32
AnythingAlexia
Рет қаралды 16 МЛН
ДЕНЬ УЧИТЕЛЯ В ШКОЛЕ
01:00
SIDELNIKOVVV
Рет қаралды 3,6 МЛН
COM13b. [2/5]V11 Connecting a Siemens PLC(S7-1200/S7-1500) to an SQL Database [PLC Section]
37:09
How to connect a Siemens S7 1200 PLC to a SQL Server Database
14:56
SQL4automation
Рет қаралды 74 М.
COM22. Ethernet CIP - Siemens S7-1200/S7-1500 (Client) and Allen-Bradley CompactLogix (Server)
32:43
TIA Portal: S7-1500 to an SQL Database - LMicrosoft_SQL v1.0 Example
15:55
COM09. OPC UA - Siemens S7-1500 (OPC UA Client) and S7-1200 (OPC UA Server) TIA Portal
47:52
Electrical Automation Hands-On
Рет қаралды 56 М.
PLC S7-1200 connect with Node-Red and SQL Server Database
1:12:57
General Technology Knowledge
Рет қаралды 9 М.
SC06a. Read Incremental Encoder via Siemens PLC S7-1200 HSC(High Speed Counter)
28:16
Electrical Automation Hands-On
Рет қаралды 31 М.
COM18. ModbusTCP Client via Siemens S7-1200/S7-1500 PLC and TIA Portal
33:43
Electrical Automation Hands-On
Рет қаралды 112 М.
Как мы играем в игры 😂
00:20
МЯТНАЯ ФАНТА
Рет қаралды 3,4 МЛН