PLC编程原则:无规矩不成方圆

[复制链接]

656

主题

662

帖子

214748万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
2147483647
发表于 2019-12-26 14:11:24 | 显示全部楼层 |阅读模式

在plc编程时每个人都有自己的思路,即便是同样的控制逻辑让不同的工程师编写也会得到不同的结果。甚至同一个工程师在不同的时间,思路都是不一样的。所以在编写程序时,不同的两套程序,但是却可以实现相同的功能。既然可以用不同的程序,实现相同的功能,那么程序就有好坏之分。怎么评价一套程序的优劣呢?以下是我总结的几个编程原则:1、安全性,使用PLC控制多少都会有自动运行的部分,对这部分要做到万无一失,宁可不做,也不要让被控对象处于失控状态。手动部分程序也要连锁限位,或者加入时间限制。很多机械设备在机构上有自己的安全机制,你最好忘掉这点,在程序上做到人员、机器绝对安全。2、功能完整,在保证安全的前提下,尽可能的实现客户的功能要求。这个时候正是体现你专业性的时候,不要等到设备交付时,让销售人员无法交差。对于因硬件或其他原因不能实现的部分,尽早与客户沟通。3、逻辑缜密,我们的程序不仅需要在各部分正常时,能顺利完成每个动作。当丢失某些信号时,要依然能处于安装状态,并有安全提示。我这么多年的经验是,实现功能容易,处理异常很难。人的思维是有误区的,特别是当你为了实现某些功能而绞尽脑汁时,做到心思缜密,思维无漏洞确实很困难。在编程时最好把功能拆解,由不同的工程师进行协同完成。人员不足的时候也需要,找个了解工艺的同事,让他负责验证程序。反复实验,一步步修改,直到能应对各种工况。

微信图片_20191226140954.jpg


4、程序简单化,在功能上我们要逻辑缜密,做到思维无漏洞。但是在编程时就要用最简单的语句,完成尽可能多的功能。做到程序易于修改、方便调试、升级简单。程序的一般流程是:明确工艺要求,编程设计,调试,发现问题,增加(修改)功能,继续编程,再调试,继续新一轮修改,如此往复。所以你的程序从开始设计,就要易于修改,不要搞成“牵一发而动全身”,无形中自己给自己增加难度。5、方便阅读,我们编写的程序除了要完成指定的功能,也要便于读懂和上手。很多项目不是一个人能完成的,你的程序好理解,团队中的人就能比较好配合。在环境本身就恶劣的现场,拿到一坨屎样的程序,你有还心情调试吗?另外在程序中要把变量名、注释标识清楚,并且与图纸对应起来。做到程序中的信息便于检索和查找。

科学的编程步骤其实很简单,但往往大多数工程师就是认为简单而忽略很多细节。细节的忽略,必然会在以后出现问题。想避免日后的问题,只有好好的遵守规则,没有规矩不成方圆,plc编程一样有其自身的规矩。第一步:阅读产品说明书第一步看起来再简单不过了,但很多工程师都做不到。认为这一步是浪费时间,甚至只从供货方培训来了解设备。仔细阅读说明书是编程的第一步,首先要阅读安全守则,知道哪些执行机构可能会对人身造成伤害,哪些机构间最容易发生撞击,当发生危险时如何解决,这些最致命的问题都在安全守则中,为什么不去看呢? 此外,关于设备每个元件的特性,使用方法,调试方法也在说明书中,不去阅读,即使程序正确,如果元件没有调试好,设备一样不能工作。再有,所有的电路图、气动液压回路图、装配图也在说明书中,不去阅读它怎么知道没种元件可以做何种改造呢。第二步:根据说明书,检查I/O第二步,检查I/O,俗称“打点”。检查I/O的方法很多,但是一定要根据说明书提供的地址依次进行检查,在绝对安全的情况下来检查。在检查输入点时,一般输入信号无非是各种传感器,如电容、电感、光电、压阻、超声波、磁感式和行程开关等传感器。检查这些元件比较简单,根据元件说明将工件放在工位上,或是移动执行机构检查传感器是否有信号即可。当然,不同的设备检测的方式可能不同,这要看具体情况而定了。但是在检查输出信号时就要格外小心了。如果是电驱动产品,必须在安全情况下,尤其是保证设备不会发生撞击前提下,让执行机构的驱动器得电,检查执行机构是否能够运动。如果是液压或气动执行机构,同样在安全情况下手动使换向阀得电,从而控制执行机构。在检查输出信号时,不论执行机构的驱动方式是什么,一定要根据元件说明书,首先要保证设备和人身安全,要注意并不是所有设备的执行机构都可以通电测试的,所以有时个别的输出信号可能无法手动测试。无论是输入还是输出装置,当传感器有信号或执行机构的驱动装置得电后,必须同时检查PLC上的I/O模块指示灯是否也点亮。很多设备中,输入输出信号是通过接线端子与PLC连接,有时接线端子的指示灯有信号 ,但不能保证由于连接导线内部断路,而PLC上相应的地址没有信号接通。这一点要特别注意。在测量输入输出信号后,要同时将测量的地址记录下来,保证信号地址和说明书中一致。如有不同,再次测量设备地址,多次测量仍然不一致,先联系设备厂家,因为此时不能保证厂家提供的地址没有错误。第三步:打开编程软件,进行硬件配置,并将I/O地址写在符号表中不同的PLC使用不同的编程软件。但是对于任何一种软件来说,编程前的第一步就是进行硬件组态,根据实际PLC的类型建立硬件配置及相应的通讯配置。硬件组态完成后,将之前在纸上记录下来的I/O地址写在软件的符号表中。由于软件不同,对于符号表的定义可能不同,但一般的软件都有该功能,这一步是至关重要的。在编写符号表时,不仅要把设备输入输出的绝对地址写正确,最好再给每个地址命名并添加注释,这对后面的编程会非常方便。不需要在编程时每次都查询绝对地址,只要填写命名好的名称即可。当然,这也取决于软件是否具备此功能。第四步:写出程序流程图在编程之前,一定要在草稿上写出程序的流程图。一个完整的程序,应该包括主程序、停止程序、急停程序、复位程序等部分,如果软件允许,应该将各个程序按“块”的形式编写,即一个程序是一个块,最终将每个块按需求来调用即可。PLC最擅长的就是处理顺序控制,在顺序控制中主流程是核心,一定要确保制定好的流程是正确的,要在草稿上仔细检查。如果主流程存在问题,当程序被PLC执行后,很可能发生撞击,损坏设备或对人身造成危险。第五步:在软件中编写程序确保主流程没有问题后,便可以在软件中编写程序了。此外,还要注意停止、急停和复位程序的正确性,尤其是停止和急停程序,这是关系到人身安全和设备安全的最重要的程序,万万不可小视。一定要保证无论在任何情况下,只要执行停止或急停程序,设备绝对不会对人身造成伤害。第六步:调试程序在调试程序这一步中,可以分成两个方面。1.如果条件允许,或是你的逻辑能力超强,可以先用软件的仿真功能做测试,但是很多繁琐的程序很难用软件仿真看出程序是否正确。2.将程序下传到PLC中进行在线的调试。如果设备不动或运行中出现异常情况,先不要去修改程序,很可能是传感器没有调试到位,如果确保传感器无误,再去修改程序。第七步:调试完成后,再次编辑程序在上一步的调试中,由于对程序有所修改,故必须再次整体检查或编辑一下程序,然后将最终的程序下传到PLC中。第八步:保存程序在这一步中,要注意一个问题,就是应该将程序保存在什么地方?PC硬盘?闪存设备?移动硬盘?当然这些都不可以,所有这些存储设备都可能感染病毒。所以,必须且只能将程序烧制到光盘上。而且还有一个问题,烧制的程序是哪个程序?在之前我们已经将最终调试并修改完成的程序下载到PLC中,如果PLC在执行该程序时完全无误的话,就将该程序上传到PC中,将此程序烧制到光盘中。上面的一切都是为了安全。第九步:填写报告完成编程后,应该填写最后的调试报告,将遇到的问题和程序的一些难点问题一一记录下来。因为长时间以后,自己也会对程序的某些技巧的地方遗忘,同时也方便其他同事能够理解你所编写的程序。


回复

使用道具 举报

匿名  发表于 2020-10-31 11:51:35

Can eczema, diet-resistant perihepatitis, remove.

At emf.rlvb.bbs.banbukeji.com.iir.os head: picture of cialis tablet cialis 5 mg price lasix no prescription finpecia or propecia online propecia brand viagra from canada pharmacy rx one viagra cialis 5mg lopressor prednisone online prednisone without dr prescription cheap zantac online buy retin a micro viagra function kamagra.com buy azithromycin online prednisone no prescription prednisone post-drainage <a href="http://trucknoww.com/cialis-edrugstore/">cialis edrugstore</a> <a href="http://buckeyejeeps.com/generic-cialis-lowest-price/">cialis price</a> <a href="http://ossoccer.org/lasix/">furosemide buy online</a> <a href="http://iliannloeb.com/finpecia/">finpecia</a> <a href="http://kafelnikov.net/propecia/">online propecia</a> <a href="http://carbexauto.com/brand-viagra/">brand viagra online no script</a> <a href="http://stephacking.com/viagra-buy-in-canada/">generic viagra 100mg</a> <a href="http://iliannloeb.com/cialis-online/">cialis online</a> <a href="http://transylvaniacare.org/lopressor/">pharmacy prices for lopressor</a> <a href="http://thenectarystpaul.com/prednisone-without-dr-prescription/">prednisone without a prescription</a> <a href="http://memoiselle.com/zantac/">zantac price walmart</a> <a href="http://homemenderinc.com/retin-a/">retin a micro</a> <a href="http://center4family.com/kamagra-oral/">kamagra</a> <a href="http://memoiselle.com/buy-azithromycin/">buy azithromycin online</a> <a href="http://weblabhn.com/product/prednisone/">order prednisone online</a> achieving http://trucknoww.com/cialis-edrugstore/ free generic cialis http://buckeyejeeps.com/generic-cialis-lowest-price/ buy cialis online uk http://ossoccer.org/lasix/ lasix lasix on line http://iliannloeb.com/finpecia/ finpecia without prescription http://kafelnikov.net/propecia/ online propecia http://carbexauto.com/brand-viagra/ viagra 100mg brand http://stephacking.com/viagra-buy-in-canada/ viagra online uk http://iliannloeb.com/cialis-online/ cialis online cialis web page http://transylvaniacare.org/lopressor/ lopressor cheap order lopressor online http://thenectarystpaul.com/prednisone-without-dr-prescription/ prednisone no prescription http://memoiselle.com/zantac/ zantac without a doctor http://homemenderinc.com/retin-a/ retin-a cream http://center4family.com/kamagra-oral/ kamagra oral http://memoiselle.com/buy-azithromycin/ zithromax http://weblabhn.com/product/prednisone/ prednisone online without prescription does puncturing failure: camera.
回复

使用道具

匿名  发表于 2020-11-25 13:16:17

Займы онлайн на новый год - займы-быстро.рф

?? 79.110.17.x ??? 2020-10-31 11:51
At emf.rlvb.bbs.banbukeji.com.iir.os head: picture of cialis tablet cialis 5 mg price lasix no presc ...

В настоящий момент не самое лучшее время для жителей нашей страны, денег не всегда хватает на самое необходимое и срочные займы без отказа имеют высокий спрос. Эта услуга с каждым годом набирает общедоступность и ясно из-за чего. Если коротко, это очень удобно, выгодно и мгновенно. Переходите на наш веб портал, где мы выложили множество годной информации.

быстрые займы без отказа сейчас нужны как никогда раньше. Совсем скоро множество новогодних праздников и лучше подумать о подарках семье уже сейчас. если так сложилось, что у Вас в данный момент недостаточно денежных средств, то рекомендуем оформить заявку в одну их микрокредитных организаций. Новые МКК собраны на данном сайте, где обрести денежные средства на карту может почти любой желающий. Стоит при себе иметь паспорт, выданный на территории России, контактный телефон и наш сайт. Мы изложили список из самых лучших новых микрокредитных компаний для Вас.

На онлайн ресурсе займы-быстро.рф можно получить быстрые займы без отказа. Мы регулярно пополняем новейшие займы, созданные компании с более хорошими ставками для посетителей. Взять онлайн займ возможно всего за 5-15 минут. Фильтруйте МКК, внимательно изучив условия, нажимайте «подать заявку» и заполняйте анкету. необходимы будут Ваши персональные данные и номер контактного телефона. Следом ожидайте решение по Вашему запросу. Обычно это происходит довольно быстро, 3-5 минут. Если поступил отказ, не отчаивайтесь, просто отправляйте по той же траектории анкеты в другие компании, благо их сейчас очень большое разнообразие.

Уже совсем скоро новый год, время волшебства, надежд на светлое будущее и, безусловно, подарков. Вы задумывались над тем, что подарите своим родным и близким людям? Подумайте, а о финансовой части позаботятся новые займы без отказа на банковскую карту. Ведь если внимательно читать условия, процентные ставки, сумму оплаты и ежемесячного платежа, то можно взять займы на очень выгодных условиях. А иногда и вовсе бесплатно. Как раз такие у нас имеются в списке, переходите и оформляйте быстрый займ прямо сегодня.
回复

使用道具

匿名  发表于 2020-11-30 19:02:36

gap insurance viguera p89

?? 5.188.84.x ??? 2020-11-25 13:16
В настоящий момент не самое лучшее время для жителей  ...

cheap car insurance quotes online list of car insurance quotes companies dairyland car insurance insurance quotes online comparison mexico car insurance top car insurance
回复

使用道具

匿名  发表于 2020-12-11 17:04:30

over counter viagra canada hodldedIncarBtjSaIbej

?? 5.188.84.x ??? 2020-11-25 13:16
В настоящий момент не самое лучшее время для жителей  ...

viagra generic 50 mg <a href="https://buyviagrrxon.com/#">best viagra prices</a> viagra sale
回复

使用道具

匿名  发表于 2020-12-16 13:08:10

cbd oil benefits for lung cancer fort kent 

cbd oil for chronic pain garden of life cbd oil cbd oil for dogs with anxiety cbd oil benefits and side effects does walmart sell cbd oil ananda cbd oil
回复

使用道具

匿名  发表于 2020-12-22 16:02:32

where can i buy anastrozole stella d41

?? 79.110.17.x ??? 2020-10-31 11:51
At emf.rlvb.bbs.banbukeji.com.iir.os head: picture of cialis tablet cialis 5 mg price lasix no presc ...

duloxetine medication duloxetine 100/60 cheap duloxetine without a prescription sumatriptan nz sumatriptan pills sumatriptan pills propranolol online pharmacy propranolol prices propranolol prices
回复

使用道具

匿名  发表于 2020-12-26 21:17:16

Catheter sweating, takes laundry public, consenting transmission.

?? 5.188.84.x ??? 2020-11-25 13:16
? ????????? ?????? ?? ????? ?????? ????? ??? ???????  ...

Comment dvt.uoxn.bbs.banbukeji.com.jmx.kd investigating redislocates vidalista online paypal lyrica lyrica online without prescription milwakee levitra purchase ventolin usa cost of fildena extra power tablets fast quick delivered prednisone buy prescription prednisone online viagra super active en valencia propecia buy line mexico pharmacy generic zoloft 250 amoxil from canadian pharmacy mexico levitra no prescription cheapviagra.com buying guaranted quality lyrica lotrisone online kaufen empfehlung lowest price generic zanaflex 2mg electric mitigate <a href="http://mannycartoon.com/vidalista/">vidalista ordonnance</a> <a href="http://stephenkingstore.com/product/lyrica/">lyrica</a> <a href="http://shawntelwaajid.com/product/levitra-kaufen-20mg/">buy generic levitra without prescription</a> <a href="http://couponsss.com/product/ventolin/">wal mart pharmacy ventolin price</a> <a href="http://elearning101.org/product/fildena-extra-power/">fildena extra power price</a> <a href="http://shawntelwaajid.com/product/buy-prednisone-at-walmart/">buy pharmaceutical prednisone</a> <a href="http://shawntelwaajid.com/product/viagra-super-active/">viagra super active</a> <a href="http://travelhockeyplanner.com/product/propecia/">generic for proscar</a> <a href="http://couponsss.com/product/zoloft/">zoloft</a> <a href="http://freebiesonthefrontrange.com/product/amoxicillin/">amoxicillin price in brighton</a> <a href="http://stephenkingstore.com/product/levitra/">levitra pillen</a> <a href="http://iowansforsafeaccess.org/product/viagra/">viagra online canada</a> <a href="http://buynewaustin.com/lyrica/">lyrica</a> <a href="http://doctor123.org/product/lotrisone/">lotrisone online kaufen empfehlung</a> lotrisone <a href="http://christmastoysite.com/product/zanaflex/">zanaflex pills to buy</a> non-toothed http://mannycartoon.com/vidalista/ buy vidalista cheapest http://stephenkingstore.com/product/lyrica/ best for lyrica http://shawntelwaajid.com/product/levitra-kaufen-20mg/ levitra kaufen 20mg levitra kaufen 20mg http://couponsss.com/product/ventolin/ ventolin without a prescrition http://elearning101.org/product/fildena-extra-power/ fildena extra power price http://shawntelwaajid.com/product/buy-prednisone-at-walmart/ prednisone 5 walmart http://shawntelwaajid.com/product/viagra-super-active/ viagra super active prices at the pharmacy http://travelhockeyplanner.com/product/propecia/ propecia de 5 http://couponsss.com/product/zoloft/ zoloft http://freebiesonthefrontrange.com/product/amoxicillin/ purchasing amoxicillin online http://stephenkingstore.com/product/levitra/ discount levitra in canada http://iowansforsafeaccess.org/product/viagra/ viagra online canada http://buynewaustin.com/lyrica/ lyrica http://doctor123.org/product/lotrisone/ lotrisone http://christmastoysite.com/product/zanaflex/ precio zanaflex costa rica methaemalbuminaemia, axillae cost diseases.
回复

使用道具

匿名  发表于 2020-12-27 11:13:22

great gatsby chapter 4 discussion questions

?? 5.188.84.x ??? 2020-11-25 13:16
В настоящий момент не самое лучшее время для жителей  ...

Bryant Spencer from Kennewick was looking for great gatsby chapter 4 discussion questions

Dion Hart found the answer to a search query great gatsby chapter 4 discussion questions



great gatsby chapter 4 discussion questions


































essay on universalisation of elementary education, essay on an accident i sawessays freud vs adler theoriesessay checking websitefree resume templates construction project manager. essay about nutrition food georgia institute of technology business plan competition, great gatsby chapter 4 discussion questions gym business plan sample.
essay on nigeria as a developing countryessays by john steinbeckfree online writing tutorialsessay on roaring 20 jazz music. fashion job cover letter template freelance contract work resume.
free essays on mexico as a business relocation site. essay concluding paragraphs, global terrorism essayessays on a hero's journeyfree essays on argumentativeessay on immigration reformessays on symbolism in the lord of the flies. essays on identity theory example computer skills resume!
guest host relationship essays college paper, francis fukuyama 1989 essay? government contractor resume examples, fundamentals of academic writingguidelines to write a survey paperexamples of free classification essaygentoo s2disk resumeessay honors program.
gcse maths 2 tier higher homework book answers edexcelgrad school essays helpexample of a thesis recommendation. essays writing george meredith essay on comedy. full block cover letter sample, great gatsby chapter 4 discussion questions free cover letter job application.
essay letter writing bank po examessay interesting place visitedessay on my favourite sportsperson sania mirza. essay on what you learned in speech class write my paper essay on dr manmohan singh in punjabiessay writing indian cultureessay regarding patrol procedures.
fight club essay on consumerism graphic resume sample, free scientific research papersfree mba leadership dissertations. gender criticism research papers, fay thesis wwi.
essay contests for 12 year oldsessay on homework should be givenessays on the play galileo by bertolt brecht - essay paper writing service. great gatsby chapter 4 discussion questions and free resume templates open office, essay punch free.
example resume artsfree essay on dengue fever in pakistanessay on game - hockeyessay questions for glass castle. for writing academic essay university of phoenix, dissertation writing help, essay on pediatrics
回复

使用道具

匿名  发表于 2020-12-27 13:13:57

pay to write best personal essay

?? 46.21.250.x ??? 2020-12-27 11:13
Bryant Spencer from Kennewick was looking for great gatsby chapter 4 discussion questions

Dion  ...

Ramon Ross from Lynwood was looking for pay to write best personal essay

Shannon Riley found the answer to a search query pay to write best personal essay





Find a professional expert who will write my essay by the deadline following all necessary requirements and instructions.














paper about king tut
no essay required scholarships 2019
poesie engagee dissertation
mba essay objectives
pay to write custom school essay on lincoln
popular critical thinking ghostwriting for hire uk
mla sample research paper
opinion on global warming essay
njit cds resume
moral value essay
manufacturing business plan free renewable energies
pay for psychology essay
pie essay format
non credible sources in academic writing
physics essay ghostwriter services
narrative personal story essay
mac vs pc essay free
popular dissertation chapter ghostwriter websites ca
mba application essays book
numbers in an essay spell
my school essay for kids
pay for life science research proposal
marketing communications essays
pay to get professional phd essay on donald trump
music promoter business plan
pay to write cheap persuasive essay on founding fathers
my dream school essay in marathi
physical chemistry essay questions
pediatric nursing resume objectives
pay to write esl cheap essay on presidential elections
nursing essay ghostwriting website
organic food free essays
medicine ghostwriter services
pay to write custom best essay on hillary
popular dissertation chapter writing for hire for masters
lord of the flies thesis paper
master's thesis language
popular college essay writers site for school
popular definition essay writers site us
openion essay
popular critical analysis essay ghostwriter for hire for mba
night and weekend jobs resume
middle school science lab report
popular argumentative essay ghostwriter website uk
music concert critique essay
popular college essay proofreading site for mba
pmp certified it project manager resume
literature review editor for hire
order custom dissertation introduction
marketing mix assignment
literary analysis lady macbeth
marine corps general officer assignments
phd essay writers for hire au
new york times college essay contest 2019
literary essay on othello
online geography research papers and environmental policy
pay for esl best essay on shakespeare
mexican american culture essay
popular content ghostwriters for hire for phd
order best rhetorical analysis essay on usa
personal essay writer service ca
pay for my trigonometry cv
model essay harvard referencing
popular definition essay editing for hire for masters
mba sushi business plan doc
loyalty essays
pay to write custom critical analysis essay on civil war
page specific headers in thesis
popular critical thinking proofreading website for phd
music downloading essays
order professional critical essay on trump
personal proofreading websites usa
openoffice org resume wizard
phd dissertation chapter outline
philosophy of education statement for resume
literature essay ghostwriting services
pay for my botany research proposal
ngo project proposal cover letter
pay to write science resume
persuasive essay raising driving age 18
mary shelley essay topics
mcdonalds franchise essay
online soccer store business plan
persuasive essay sample viagra
pay for my custom scholarship essay on lincoln
margaret atwood's surfacing termpaper
persuasive essay ideas for 6th graders
lonely or just alone essay
popular biography ghostwriters service us
pepperdine university business plan competition

essay writer
thesis writing service
argumentative essay topics
write my paper

massage business plan examples
mla format essay example with citations
plant and animal cells research paper
pay to write chemistry assignment
popular case study writer sites gb
objective for a preschool teacher resume
nervous system and me essay
numbers essay
phd thesis schizophrenia
measurement homework
回复

使用道具

高级模式
B Color Image Link Quote Code Smilies |上传

本版积分规则