2/2/2017 4:41 PM | |
Posts: 36 Rating:
|
Hello,guys I had a task to create a run-time-counter for more than 730 technology objects using STEP 7 V5.5 SP4 Using LOOP instruction and indirect addressing the task was done and the counter is ready to use. There is only one problem it takes too much space in M-area. Here is the question. How to move a particular bit from DB1 to a particular bit in DB2 using indirect addressing? Example: ///////////////////////////////////////////////////////////////////////// FC1 // the function requires the data from DB1 NEXT: number of cycles L P# 0.1 L MD 0 +D T MD 0 A #valves_state_bit // another object every loop (731 bits) = M [MD0] LOOP NEXT ///////////////////////////////////////////////////////////////////////////// FC2 //the function put the data from M-area to DB2(run-time-counter) NEXT: number of cycles L P# 0.1 L MD 0 +D T MD 0 A M [MD0] = run_time_counter_starts here LOOP NEXT /////////////////////////////////////////////////////////////////////////////// Also you can find the program in attachment (m0.3 sec pulse) Thanks in advance! AttachmentTest_1.zip (37 Downloads) |
Last edited by: Bonobo at: 2/2/2017 5:54:41 PMLast edited by: Bonobo at: 2/2/2017 5:56:01 PMLast edited by: Bonobo at: 2/3/2017 7:50:21 AM |
|
2/2/2017 6:42 PM | |
Joined: 12/9/2010 Last visit: 10/8/2022 Posts: 623 Rating:
|
Hi Bonobo, The attached program can only be opened in ur language. U have to change it. How to move a particular bit from DB1 to a particular bit in DB2 using indirect addressing? -- If u want to use indirect addressing, all 'particular' addresses should have some logical/mathematical linking. U can add another DB instead of using M area and use OPN DB## to read/write. |
If you like the comment, rate it (right top) or thank it (left bottom). |
|
2/3/2017 8:04 AM | |
Posts: 36 Rating:
|
Hello Sachinpatke, I changed the language parameters in the project so you can check it out and to see that there is strong logical/mathematical linking in my code. Anyway,thanks for your help Sincerely, AttachmentTest_1.zip (40 Downloads) |
Last edited by: Bonobo at: 2/3/2017 9:56:07 AM |
|
Follow us on