RobotStudio event

SmartComponent OPC UA with TIA

Anyone got connect TIA and PlcSim advanced with OPC UA smart component? My doubt is about the .csv file to connect signals. 

Comments

  • Got it running with plc input/output to smart component, though i cant communicate with the virtual controller with i/o signals, only to DB. Have to serialize it from DB to i/o. 
  • Hello @diegoteofilo
    Can you elaborate on the issues you are facing? 
    Also see this post, maybe it can give you some assistance: 

    https://forums.robotstudio.com/discussion/12972/opc-smart-component#latest


    Nils Olofsson
    PC Software Support Engineer

  • You can also export the opc server as an xml-file to read how the TIA server is presented to the opc client in robotstudio 
  • Hello @diegoteofilo
    Can you elaborate on the issues you are facing? 
    Also see this post, maybe it can give you some assistance: 

    https://forums.robotstudio.com/discussion/12972/opc-smart-component#latest

    Thank you for your support! I will try a better explain, please see below:

    Server node address:


    myfile.csv 


    Import Error:



  • Hello.
    If you download the latest version of Robotstudio (2021.2) there is now a UI which will help you to browse namespaces and connect signals! I think this will solve your issues.

    Nils Olofsson
    PC Software Support Engineer

  • Hi!

    I'm trying to connect PLCSIM adv and OPC UA Client (In RS2021.2), i have made it work with the signals i want to have as signal on the smart component, but i haven't been able to connect signals to the device. The text in the configure windows says that it wants "bytearray", but it doesn't recognize my array of bytes? It do recognize my array of USint but the component cant write to them? "Bad result writing OPC UA data for node 5 (status: 2155085824)." I can write signal that i use in the smart component with out any issues
  • Hi!

    A little update! i can write to the array of USint from the robots controller, if it was moved in to the OPC UA Server not as part of a DB, maybe i just hade something wrong in the settings of the DB, but Array of bytes doesn't work? 




    My question is also that we usually have the signals in the PLC for the robots as if it was a normal node on the profinetnetwork? But to get OPC UA component to work does signals needs to be as an array? 
  • New update from what i have found, the component can only handle 64 bytes setting in Profinet, and you cant use ProfiSafe at the same time
  • saitoevc
    saitoevc
    edited August 2022
    Hello @ErikHagman, have you succeeded to solve (status: 2155085824)? 
    I can write Byte2USInt>RobStudio, but not opposite (back to TIA Portal USInt2Byte)...
  • DenisFR
    DenisFR ✭✭✭
    Hello,
    In other way, did you test these smart components:

    They don't need PLCSim Adv (only normal). They use S7Online connections.
  • Ciao @saitoevc!
    Did you find a solution to your issue? I have the same one

  • Ciao @dragolollo sorry a late response> yes, you need to implement a Read/Write FB in TIA:
    1. Create a myDB e.g. with:
          . "IN_FromPLC" Type Array of USINT [0...63]
          . "OUT_ToPLC" Type Array of USINT [0...63]
    2. Create a default tag range e.g.
        . OPC_IN Type Array[0...63]of Byte > %Q4000.0
        . OPC_OUT Type Array[0...63]of Byte > %I4000.0
    3. Create a FB "myFB":
         . FOR #i:=0 TO 63 DO
           
           "myDB".IN_FromPLC[#i]:=Byte_To_Usint("OPC_IN"[#i]);
           "OPC_OUT"[#i]):=USINT_TO_BYTE ("myDB".OUT_ToPLC[#i]);
         
          . ENDFOR;
    4. Call from OB1 or somewhere in the loop
    . call "myFB"

    5. Monitor your DB if active or not
    PS.: if you are trying from different OS / VM there will be some tricks =) let me know