PLC program testing assignment question

Join Date
Jun 2019
Location
Glasgow
Posts
2
I have a BTEC assignment that requires me to answer the following question:

Relating to PLC programming standards and/or commercial products, explain the usefulness/limitations of:

a) 2 test PLC program methods

The only program test methods I am aware of are forcing I/Os and simulating.
Internet searches have not been very useful, mainly explaining what these methods are without giving advantages/limitations. Just wondering if anyone has any ideas/useful websites (question requires website references for evidence) that may help?
 
Simulator is one such method... Plenty of PLC manufacturers ship a PLC simulator to allow the code to be simulated in your PC.

Siemens for example has fantastic capabilities such as connecting to an HMI or even simulating PLC comms between two instances of the simulator.

Siemens also has a process simulator called SIMIT which seems really powerful, although laborious (in my experience) to set up.

https://w3.siemens.com/mcms/process...ents/engineering-system/pages/simulation.aspx

The advantage is clear as your code will have been run and can be tested with an HMI cutting the testing on the factory floor by a fair bit.
The limitation is that you'll still have to check your hardware and some things aren't really easily simulated so you'll have to do them on the spot.

While I'm at it, you can also write code for simulating stuff. I worked in a company that devoted a fair bit of resources to program the system itself and then test their control programs against the actual system or plant itself. This works quite well if, for example, you know how a certain process behaves and you have a model for it.

Lastly, Siemens PCS7 (their process control offering), has process blocks created that allow simulation out of the box. So your code doesn't need to see the actual devices to simulate the process.
 
"question requires website references for evidence"
so today, teachers urge students to find the answers on the internet !?

The question posted is the kind that there is no definite answer to. Having to provide "evidence" by referring to a website is idiotic !
In my time, we had to answer with our own arguments. It was not important that we had the perfect answer, it was important that we used our own brain to try and answer as good as we could.
Oh well, what the worlds has come to .....
 
There has been a lot of threads regarding simulation but some of the simulation programs can be expensive. I worked with an apprentice doing a degree and part of this was creating, simulating a program. He was lucky that we had a small project using a small FX3U and Beijers HMI, The best way forward was to create the program in GXWorks and simulate the program using the in-built simulation software, however connecting the HMI to the simulation was not an option so I suggested that he created the program but map the inputs to internal memory bits in a block but not call the block. Build extra blocks to simulate valves opening/closing & motors running etc. These simulation blocks were used to simulate the I/O and feedback signals for example when an output was turned on a delay timer would then turn on the relevant mapped bit for the input and so on, analogues were simply done by simulating the temperatures, flows, weights etc. by incrementing or decrementing values in the simulation blocks. This created a simple but reasonably accurate real time process. Of course it will need the main PLC processor but not all the I/O and the HMI also had extra pages to act as remote push button stations etc.
The documentation contained print screens of the process running (and actually a video of the process running was added to the project). this produced evidence of the process in operation but I have been involved with other students and evidence from external, reliable sources is a must. In the UK it seems that when compiling a paper on a particular subject evidence is the key for top marks and very little on your personal input. typically a paper would require 30+ references from trusted sources and on a paper of 3000 words does not leave much for your own experiences or input. Be careful as plagiarism is easy to detect as modern software can highlight it (how many people can write about a subject using expected technical language without almost copying some body else's).
 
1 test would be see if it works, the other would be see if the plc program didn't. Sorry the internet isn't going to give you that answer, but what do some of these institutions want as an answer. Why don't they just teach them!
See the length of answer from someone that hasn't been to university.
 
Last edited:
Having well-written code goes a long way in testing your code.
Sometimes you can test parts of your code by wiring on the bench some components and test that specific part of the program. (Forcing I/O can be part of this process.)
Testing parts of the code before the entire code is run can be critical in finding errors and correcting before the commissioning of the PLC.

Regards,
 
If we wait awhile Geospark should be able to give usr a few pages to fill out "HIS" answer.
The beauty of that is we all get to learn. He is a mountain of knowledge or he has a instant copy machine from all worth while sites at his finger tips, GO Geospark.
Your humble servant as always ......
 
In the UK it seems that when compiling a paper on a particular subject evidence is the key for top marks and very little on your personal input. typically a paper would require 30+ references from trusted sources and on a paper of 3000 words does not leave much for your own experiences or input.

This was my problem with teaching in the UK if you have experience in the subject and want to pursue a degree. Personal opinion or experience means nothing, which was quite frustrating.

"question requires website references for evidence"
so today, teachers urge students to find the answers on the internet !?

Considering the question is asking about modern products that are commercialised a website would be a good source of information, no?

I would want to see the source so I could assess how good the student was at breaking apart the manufacturer's advertising and presenting his thoughts on the claims. But maybe that's just me.
 
I suggest you use sites like EEP (Electrical Engineering portal).
You are not completely clear on what you are testing. The start I suggest is testing the code on a simulator of some description whether this be by an actual simulator or in many small applications incorporate some code that simulates the real time actions i.e. use internal bits in program and only map real inputs (and possibly outputs) in a block that is not enabled during testing.
Create temporary blocks to simulate feedback i.e. if an output energised (say a Valve) use the output to drive a timer to turn on the mapped input (valve open Limit) and so on, if you code the timers to simulate the movement time of valve opening or an object moving to a destination this gives a more realistic simulation of the plant. You should produce test sheets, these can be used to check functionality and correct I/O mapping in simulation and on-site when commissioning. For on-site then the first thing is to do an I/O check for example inputs should be triggered (example is limit switch manually actuated and the correct input is indicated). These are known as I/O checks and should be ticked off on test sheets.
For outputs some PLC's have functions to force outputs on, however this must be done with safety in mind.
Next when all I/O checks have been performed functional testing of routines can be done.
If you create the mentioned test sheets you can use them in your paper as evidence of the testing procedure possibly as appendices.
 
Considering the question is asking about modern products that are commercialised a website would be a good source of information, no?
Gathering information from what vendors and standards organisations have to say about software testing can be valuable, for sure. But it does not rule out the need for using ones own understanding and common sense in answering the question. It is actually the more important part, just my opinion.
What vendors have to say is usually extremely positive, but at the same time vague.
What standards organisations have to say can be ridicolously verbose and complex, just to state the obvious.
Citing either of the above doesnt necessarily show an understanding of the advantages and limitations of software testing.

I might be wrong, but I understand it as this due to the line about "evidence":
The student that presents an intelligent answer to the question, no matter how well argued, he or she fails.
The student that presents some answer to the question, "evidenced" with links to a website, he or she passes.
 

Similar Topics

I have two AB MicroLogix 1500s that I want to be able to communicate with each other via two Transnet 900 radios (one master, one remote). Using...
Replies
2
Views
1,593
Can we use a Simotion D455 ethernet port x127 as a gate, to access S7-1500 plc Tia Portal program ? In the Simatic manager, we used Netpro to do...
Replies
2
Views
85
Posted this to Reddit with little success, so I figured I would share it here as well. Very new to PLCs, but figured I would give it a shot to...
Replies
0
Views
122
I'm a beginner in the automation field and I've set up an automation system connecting several devices (datalogger, radio, etc.) via Modbus RS485...
Replies
5
Views
215
Hi All, want to ask. I have PLC a programme to control the valve. The existing programme is to control valve A (Y22), and I want to change to...
Replies
2
Views
144
Back
Top Bottom