Cancel
Showing results for 
Search instead for 
Did you mean: 

Vitrual Commissioning: Force Inputs via OPC

Experimenter
Experimenter

Hi,

 

At the moment I'm trying to create a small testbed for Virtual Commissioning, but  I'm struggling with the PLC. While it's in the RUN Mode Process Simulate isn't able to simulate Input-Signals properly,  in the STOP Mode the PLC the Signals. According to my knowledge this problem shows up, because of the  PLC's behavior to update all I/O-Bits before a cycle starts.

I'm able to write and read data, but we're planning to use the Process Simulate to validate and optimize our machine software as well as to train our employees, while the real machine is still in the manufacturing process. So we need the possibility to exchange for example binary sensor signals.

 

Is there any way to solve this problem, without putting that much logic inside the simulation itself and keep it on the PLC? For example to force them, like it's possible with STEP7.

 

Best regards,

 

Stein_Rim

7 REPLIES

Re: Vitrual Commissioning: Force Inputs via OPC

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi,

not sure I understood what you are saying...

You are connecting to a machine in production and you are about to write inputs from PS?

Are you sure you should do that? Sounds highly dangerous to me.

 

Anyway: if you set inputs from different devices, you have a conflict.

That's depending on how the PLC it's treating OPC-signal vs. other signals.

 

For proper forcing, you will have to force from within the PLC.

 

Re: Vitrual Commissioning: Force Inputs via OPC

Experimenter
Experimenter

Hi,

maybe I explained the wohle kind of too complicated...
I've got the PLC on my desk right beside my notebook. The machine only exists in CAD right now, were planning to review our software in order to lower the commissioning time on the factory floor.

 

Maybe forcing, as well wasn't well chosen...

 

But do I understand you correctly, that it isn't possible to link a simulated sensor via an OPC server to the PLC?

Because thats exactly what we want to do.

Re: Vitrual Commissioning: Force Inputs via OPC

Siemens Phenom Siemens Phenom
Siemens Phenom

Ok, now I'm with you Smiley Happy

 

"But do I understand you correctly, that it isn't possible to link a simulated sensor via an OPC server to the PLC?"

> of course you can, this is the whole idea behind VC

 

Your input signal (e.g. sensor) should definitly not be written in any way BY the PLC.

 

What do you mean by "Process Simulate isn't able to simulate Input-Signals properly"?

Is the sensor activated? Is the signal connected/has address/has PLC-connection?

Re: Vitrual Commissioning: Force Inputs via OPC

Experimenter
Experimenter

Great!

 

" What do you mean by "Process Simulate isn't able to simulate Input-Signals properly"?
Is the sensor activated? Is the signal connected/has address/has PLC-connection? "

 

I had some difficulties with my sensors, especially after PS crashes. But I found a way to solve this.

 

The only issue I got to solve right now, is the communication between PS and the PLC.

 

In order to explain my problem more pictorial, I made some screens.

 

Exemplary sensor signalExemplary sensor signal

This is the actual signal configuration, I played a bit with the external connection setting but it changes a bit, if the OPC is selected or not. Due to this the field is empty.

 

Simulation Panel during SimulationSimulation Panel during SimulationPLC in Stop Mode during SimulationPLC in Stop Mode during Simulation

While the PLC is in Stop Mode, all signals are transfered properly to the PLC via OPC connection.

If the RUN Mode is activated the PLC, kind of ignores everything sent via the OPC except modified Data.

 

PLC in RUN ModePLC in RUN Mode

I hope this gives you an image as clear as possible of the problem.

 

The only remaining idea i've got is to try a different OPC-Server or do you know any other possible source of error?

Re: Vitrual Commissioning: Force Inputs via OPC

Creator
Creator

Hi,

 

I believe this may be due to the hardware that is configured (in siemens) overwriting the OPC data and since there is no harware attached this would zero everything down. This would only happend if the PLC is in RUN. If you were using a Simulation Unit (formally SIMBA) this gets round that problem.

 

Maybe you can try disabling the hardware in the hardware configurator and see if they stop overwriting the IO?

Re: Vitrual Commissioning: Force Inputs via OPC

Experimenter
Experimenter

Thanks a lot,

 

That actually solved my problem so far Smiley Happy

 

But I'd still like to know, if there is any more elegant solution for this issue. Because in my opinion it's not the way this should work, not sure if it's a matter of the used server or something else. I'm just curious why there is no other possibility or if I'm just not aware of it.

Highlighted

Re: Vitrual Commissioning: Force Inputs via OPC

Creator
Creator

Unfortunatley due to the nature of PLC's, unless you are using SIMIT or the siemens Simulation unit which mimicks the real hardware, there is no other way round this that I know of.

 

The hardware inputs will be constantly read by the PLC depending on the hardware update times specified in the hardware not on the PLC scan cycle.

 

Some customer specifications dont use the IO directley but copy the IO into user defined areas at the start of a scan cycle, which means the input values stay the same for the scan cycle. If this was the case you could interupt this in the PLC code and copy from you own area that the OPC writes to. We currently, in our company, do this for Rockwell PLCs using a Ford DCP specification.