2/2/2012 3:24 PM | |
Posts: 6 Rating: (0) |
Thanks guys really useful information. A quick question, is this possible to do the same thing using ladder logic. If even I am trying to comparing with a specific value given my me in comparison. After going through the codes you guys mentioned I have got most of it but dont know how to use this logic in ladder L DBB [AR1,P#0.0] L DIB [AR1,P#0.0] ==I What actually I am trying to ahieve is to just to take a DB and then going through it and compring it with some specific number and if the comparison satisfies doing some task. But keep getting error don't know how to write lets say first 20 bytes of my DB in INT1 of comparator. If I could not explained well then the screenshot will tell you the problem. Regards, Naqqash. |
Last edited by: O_Moderator at: 2/3/2012 11:12 AMnew subject after splitting from /tf/WW/en/Posts/54866#top |
|
2/2/2012 10:33 PM | |
Joined: 1/28/2009 Last visit: 9/10/2024 Posts: 6849 Rating: (1365)
|
Dear naqqash, Check your modified version.Try to test it with your requirements. [code]OPN DB 200 LAR1 P#DBX 0.0 L 20 //load number of interations TST: T MW 10 L W [AR1,P#0.0] //16 bit integer L 5 ==I JC out +AR1 P#2.0 //2 bytes for an integer L MW 10 LOOP TST CLR = M 0.0 JU end out: SET = M 0.0 end: NOP 0[/code] You even have option of using "FC86" available in embedded libraries in STEP7.You can find it under Libraries-->Standard Library -->TI-S7 Converting Blocks-->FC86.You can use the online manual provided in STEP7 and try. By the way ,"naqqash" reminds me of artistic painting . Best regards, Hamid Hosseini AttachmentTABLE_FIND.pdf (252 Downloads) |
2/5/2012 9:09 PM | |
Joined: 1/28/2009 Last visit: 9/10/2024 Posts: 6849 Rating: (1365)
|
Dear naqqash, If I understood your plan correctly, you want to check whether DB200( a copy of DB201 in the other CPU) change or not after a period of time! To do so copy content of DB200 to another DB inside same CPU(say DB300).After passing a period of time DB200 would be updated via communication link but the content of DB300 is not changed.Compare DBs ,cell by cell, and check for any differences and then update DB300 with new values in DB200.Like the simple sample here Compare DBAbout errors in your code, I think a snapshot may help a lot.Best regards, Hamid Hosseini |
Last edited by: hdhosseini at: 2/5/2012 9:29 PM//typo |
|
Follow us on