I'm trying to connect Process Simulate to a PLC with OPC. I did the following:
- In the options tab I connected PS to a SIMATIC NET OPC server.
- Defined a resource output signal in the Signal Viewer (signal called OPC), Resource tab is empty (no recourse is using the signal?).
- In het Robot Signal editor I connected this Resource output signal to a signal defined in the PLC. (PLC input signal is called input_tecnomatix)
- In the path editor I inserted a OLP command # send OPC 0. (robot controller is default)
- I'm connected with the OPC server with OPC Scout, I'm watching the PLC signal input_tecnomatix.
- When I run the simulation this doesnt change to TRUE -> # Send OPC 0 should do this.
Can anybody give me some directions?
Thanking you in advance.
It seems to me that you are actually setting it to FALSE??
please try to use this OLP command:
# SetSignal OPC = 1
Also, have you tried to add the signal to the Simulation Panel and forced it to TRUE and see that it changes in the PLC?
Thanks for the reply.
#setSignal OPC = 1 isnt working for me.
I know I need to run the simulation to add signals to the Simulation Panel, I'm running my simulation from the Path Editor, but I still cant add a signal to the Panel?
It should work with # SetSignal OPC = 1
Please make sure that you have the study loaded in Line Simulation Mode.
You need to run the simulation from the Sequence Editor!
Set the LineOperation as "Current Operation", and run the simulation from the Seq Editor.
In order to view the signal in the SimPanel, select it from the Signal Viewer and then press the button furthes to the left "Add Signal to Viewer".
I managed to force the signal, the signal isnt changing in the OPC scout software..
Additionial info from Signal Viewer:
OPC signal: (Resource output signal)
PLC connection disabled
no external connection
input_tecnomatic: (PLC signal)
PLC connection enabled
external connection to SimaticNET OPC
Also in the Robotic Signals, my signal is defined as a RobotReady signal.
Let me see if I understand you correctly. Which of the signals are you trying to monitor in OPC Scout?
The signal you try to monitor needs to have PLC Connection ticked.
Also its important how you have set the signals to be mapped between Process Simulate and the OPC. If it is via name or adress. If it is adress you need to have the adress set in PS also.
Create a new resource input signal with PLC connection.
Insert it to the SimPanel
Start the simulation and see if you can see the signal
Hi, thanking you for al your help already!
Allright, let sum things up:
- I defined a OPC connection to my local SimaticNET server, mapping signals by signal name.
- In TIA portal I defined two signals: I1.0 called input_tecnomatix and Q1.0 called output_tecnomatix for my PLC. Im monitoring both signals in OPC Scout, both signals are default set to false.
My goal is change one of them to TRUE from PS.
So, I created a new resource input signal called input_tecnomatix with PLC connection ticked en external connection set to my local OPC. When I force the signal to TRUE, the signal isnt changing to TRUE inside OPC Scout.
I'm not 100% sure what I write below is valid for OPC-connected signals, definitly for CEE:
PS has a rule that makes sure unused signals don't spoil the performance:
Signals that are not connected in PS (e.g. connected to a Logic-Block) are ignored during simulation.
So, it may be not enough to create the signal. Try to make a new LB, create entry and exit and connect the signals to it.
Thank you, youre right about that. When I set my LineOperation as the current operation nothing is being simulated, so nothing can spoil the performance. When I force static_01 to true, this is also noticeable in the OPC scout.
But, when I set pnp_demo as the currect operation (things are being simulated) forcing static_01 to true isnt working anymore. So, I am going to experiment with this, trying to figure out when a signal is ``unused''.