Siemens S7-1200 to Arduino Modbus TCP/IP Communications Part 4.

Поділитися
Вставка
  • Опубліковано 14 гру 2024

КОМЕНТАРІ • 54

  • @aakashmalhi2114
    @aakashmalhi2114 3 роки тому +1

    Hello Mario, you work is great.

  • @plant_paradox5663
    @plant_paradox5663 3 місяці тому +1

    how fast is modbus tcp/ip?

    • @MarioCrispino
      @MarioCrispino  3 місяці тому +1

      It's quite old now so I guess it isn't that speedy. However, I haven't looked into it lately

    • @plant_paradox5663
      @plant_paradox5663 3 місяці тому +1

      ​@@MarioCrispino ok thanks for response

  • @ngocquangngo7253
    @ngocquangngo7253 3 роки тому +1

    hi Mario,
    I want to transfer data a string of numbers like a barcode, can it be transferred from arduino to plc s7 1200 in string type?

    • @MarioCrispino
      @MarioCrispino  3 роки тому

      I've never tried it but I don't see why not.

  • @erencakannn
    @erencakannn 2 місяці тому

    Hi Mario, thanks for this nice work. I'm working on my thesis. I'm getting 16#80B6 error in MB_CLINE_DB status. I can't solve it. I think it's router. Can we connect Arduino and PLC directly without router?

    • @MarioCrispino
      @MarioCrispino  2 місяці тому

      I had problems with some connectors, I guess it all depends on the wiring of your connectors. I actually just linked up an old modem in the end which worked well.

  • @Time4yes
    @Time4yes 2 роки тому +1

    This is the best tutorial, I am really enjoying. I just wanted to ask, if I want to add other sensors from my arduino, does It mean I will have to make different PTR data blocks FOR every sensor or I can use one for multiple functions?

    • @MarioCrispino
      @MarioCrispino  2 роки тому

      Wow, you must be really going for it! I wouldn't have thought so but I guess it depends what you are trying to do.

    • @MarioCrispino
      @MarioCrispino  2 роки тому

      Glad you are enjoying it too.

    • @lex-ig7qu
      @lex-ig7qu 8 місяців тому

      Well I have the same problem. At this moment I just created another mb_client block with diffrent data adress (30109) and its working as long as I choose between then. In other words I can monitor only one value in real time.

  • @plant_paradox5663
    @plant_paradox5663 Місяць тому

    For firmware v2.2 when must enter ip on enter and id =connect_id press f1 and read the manual

  • @patrykmarchlewski1093
    @patrykmarchlewski1093 2 роки тому +1

    I'm building heat pump for the Bachelor of Science degree in Mechatronics Engineering and to avoid buying analog module for s7-1200(not enough analog inputs) i'm using arduino as a temperature card with 5* ds18b20 digital temperature sensors. The diffference from movie is to send values from variables in registers to PLC... Anyway i found out ethernet module wizz W5500 lite usr-es1 is not compatible with modbus libraries or im doing something wrong. i bought shield (waiting for delivery) which is used on your video and simmilar videos which i found on yt. I think its important note because i already lost 30h and after that i went other direction and built 2 web serwers from PLC and from Arduino, but to communicate properly and share variables cross-domains it would need another device for server, because web serwer in PLC doesnt have enough resources same as arduino... Thinking it would be better to buy that analog module for pt100 or Shield W5100 at begining. Meh, educational value is nice but wasting so much time not so. Module will come at wednesday and i will start over again... Thank you for sharing your wisdom.

    • @MarioCrispino
      @MarioCrispino  2 роки тому +1

      Glad you enjoyed it

    • @patrykmarchlewski1093
      @patrykmarchlewski1093 2 роки тому

      Ok, so i made something wrong in code, I wrote it wrong way and it was my fault, still im not sure if it will work with that module which i was writting about. Im sure it wasnt working even with shield till i wrote good code. Now it working and sending data registers thru modbus tcp but i used arduino mega 2560 and shield from movie also i used modbuss poll tool to check if frames are correct. Before i changed code it shown illegall data adress. I used different libraries: SPI.h, Ethernet.h, ArduinoRS485(ArduinoModbus depends on the ArduinoRS485 library) and ArduinoModbus.h. Coudnlt find even 1 working code about data registers (found article it is difficult with arduino uno), most of examples are querstions how to do it propperly, anyway i did it :) and will post it somewhere when i done my heat pump project. Thank you again.

    • @MarioCrispino
      @MarioCrispino  2 роки тому +1

      Well done Patryk, sounds like you know a lot more about than I do about the subject. Good luck with your project. Looking forward to seeing it.

    • @patrykmarchlewski1093
      @patrykmarchlewski1093 2 роки тому +1

      @@MarioCrispino Naaaa. Without your movie i woudnl't even know how setup modbus client in PLC, but thank you :) Thats really nice to hear someone appreaciate my hardwork :)

    • @MarioCrispino
      @MarioCrispino  2 роки тому

      Glad I could help Patryk

  • @thuanhuynhthanh9680
    @thuanhuynhthanh9680 Рік тому

    please help me,how can i contact you to ask some questions

  • @mohitsingh5665
    @mohitsingh5665 Рік тому +1

    thanks

  • @李欣朋-u9d
    @李欣朋-u9d Рік тому

    Hi Mario, I follow your step to setup my s7-1200 PLC and Arduino.
    But now I got a problem that my plc cannot read Arduino's A0 Value.
    The MB_CLIENT's STATUS number sometimes show "16#7005", "16#7006" or "16#8383".
    It seems that 7005 and 7006 is send and receive status.
    But I don't know how to fix 16#8383 in STATUS number.
    Can you give me some advice to fix this problem?
    thanks!

    • @lex-ig7qu
      @lex-ig7qu 8 місяців тому

      Have you checked if your data lenght is corred to the date base? I had the same issue I just modify the lenght of data in mb_client

  • @Trungkienelectronic
    @Trungkienelectronic 2 роки тому

    PLC S7-1200 is TCP Client and Arduino is TCP Server. Is there any program Arduino is TCP Client?

    • @MarioCrispino
      @MarioCrispino  2 роки тому

      Sorry Tràn, this is the only video I’ve done to explain which is client and server. All the best

  • @moka6682
    @moka6682 3 роки тому

    Hi, I reproduced exactly the same manipulations when in the tutorial but it doesn't work. My MB_CLIENT displayed three alternating errors, 7001, 7002 and 80A4. I don't understand where it comes from because by pinging my arduino and my CPU I get feedback. You would have an idea because I'm going crazy .. Thank you

    • @MarioCrispino
      @MarioCrispino  3 роки тому

      Hi Mo. Don't worry, take a break from it for a while. I had lots of problems getting this to work as there are so many components involved. If you look at other comments you are not alone but eventually everyone gets it working. It is quite easy to forget one step and that being the case it won't work.

    • @delgado9136
      @delgado9136 3 роки тому +1

      Hey MoKa, have you entered the correct IP address of arduino to PLC?

    • @MarioCrispino
      @MarioCrispino  3 роки тому

      Thanks for helping out Delgado, much appreciated.

  • @asifislam7376
    @asifislam7376 Рік тому

    This is the best tutorial.. Can u help me please.. I have some question..

    • @MarioCrispino
      @MarioCrispino  Рік тому

      You could ask but it was a long time ago now and I may not be able to help

    • @asifislam7376
      @asifislam7376 Рік тому

      @@MarioCrispino i have some value in DB.. How to move this in holding register..so i can read the value

  • @joseneyargonsula732
    @joseneyargonsula732 2 роки тому

    Hi Mario, 1 would like to have the arduino to be a modbus client and get the data from the PLC, is it possible? also, is factory IO can also be use as a workstation or a SCADA? thanks in advance.

    • @MarioCrispino
      @MarioCrispino  2 роки тому +1

      Hi Joseney. You can switch which is the client and server. As for Factory I/O, I only use a fraction of what it is capable of. If you need to know more in depth information about the product I would recommend going to their website.

    • @joseneyargonsula732
      @joseneyargonsula732 2 роки тому

      @@MarioCrispino
      Thanks Mario, I would love to try once I get hold of "W5100".to be as a Client. Cheers!!!

  • @fransvanenschot3286
    @fransvanenschot3286 3 роки тому

    Hi Mario,
    i am a big fan from you, and i have follow all you tutorials with pleasure.
    i am impressed how relaxed you do that.
    i have follow this two modbus tutorials step by step several times, but every time i ended with the same error.
    my modebus send not correctly the data to my PLC. The MB_DATA_PTR stay on zero and the status give an 80A4 message.
    i think there is something wring with my IP address, but i don't know what.
    Because my route address is 192.168.178.1, i have used 192.168.178.120 for sent over the data from my arduino Mega 2560 to my PLC S71212.
    Also my serial data looks ok.
    What could be wrong?
    Best regards Frans

    • @MarioCrispino
      @MarioCrispino  3 роки тому

      Hi Frans
      Sometimes I've noticed it can take a while for the PLC to read the information but it usually starts working a few seconds later.
      Before you get into the PLC part, are you able to ping the Arduino from your pc on the same network?

    • @MarioCrispino
      @MarioCrispino  3 роки тому

      I have to say, the Modbus tutorials were quite difficult to actually get working correctly as there are many factors involved. My hub was a problem for a while and I had to change it to an old router I had. My original hub would communicate between Siemens equipment but not with the arduino. Then I had a faulty potentiometer and needed to order another.

    • @fransvanenschot3286
      @fransvanenschot3286 3 роки тому

      @@MarioCrispino
      yes when i use on both sites ip 192.168.0.50 i see when i ping
      4 times
      reply from 192.168.0.50: bytes=32 time

    • @MarioCrispino
      @MarioCrispino  3 роки тому

      I see you have changed the network. If the ping works then that is promising. Does the Arduino print the values to the serial monitor ok?

    • @fransvanenschot3286
      @fransvanenschot3286 3 роки тому

      @@MarioCrispino
      Yes the serial monitor is also working, when i change the potentiometer the value is also changing from 0 to 1024.
      I have also swapped from Arduino Mega 2560 to Arduino Uno with the same result what i expected.

  • @delgadojohan196
    @delgadojohan196 3 роки тому

    Hello Mario, nice tutorial..
    So i have follow your tutorial but my s7 1200 didn't receive any value from my arduino mega.
    My arduino IP : 192.168.0.3
    My s7 1200 IP : 192.168.0.1
    My PC IP : 192.168.0.109
    Can you help me to solve this problem? Is there any solution?

    • @MarioCrispino
      @MarioCrispino  3 роки тому

      Hi Delgado, I found it difficult to get working myself at first. I had problems with my potentiometer and the shield, I had to replace them before it would work. I also had a router problem in that my PC would talk to my PLC but not to the Arduino so I had to replace the router too. I'm not saying this is the problem with yours but you need to make sure each device is working before connecting all together. It took me a while and was very frustrating.

    • @delgadojohan196
      @delgadojohan196 3 роки тому

      @@MarioCrispino I can ping my arduino, router, and my PLC. But in the MB_CLIENT_DB, the ERROR is always TRUE and the BUSY always false. There are no error code..
      Edit : I found the error code. Its 16#80CE. The problem is I have already entered the same IP number in TCON_IP_v4 with my arduino's ping.

    • @MarioCrispino
      @MarioCrispino  3 роки тому

      That doesn't sound good Delgado. Not sure I would know why this is but have you unticked Optimised Block Access?

    • @delgado9136
      @delgado9136 3 роки тому +1

      @@MarioCrispino Sorry for late reply, I was busy with my thesis project. I finally solved the problem, the problem was I forgot to tick the "retain".
      Anyways thank you very much for the tutorial. Its very helpful for me to do my thesis project for monitoring using PLC.

    • @MarioCrispino
      @MarioCrispino  3 роки тому +1

      Glad you found the problem