11/1/2011 2:01 PM | |
Joined: 10/27/2011 Last visit: 8/15/2024 Posts: 13 Rating: (0) |
Dear all, [schnippschnapp] In the attachment a .txt with abit of some code iv'e been working on can be seen. Im only wondering if this is the easiest way too use BLKMOV in SCL. Seems that all information i find on the forum point to this way of usage. If anyone know of a "smaller" way to handle this in SCL could tell me i would be very thankful! Best regard, Johan AttachmentSCL CODE.zip (1346 Downloads) |
Last edited by: O_Moderator at: 11/2/2011 10:44 AMnew subject after splitting from /tf/WW/en/Posts/65035#top Last edited by: Maizlow at: 11/1/2011 4:49 PMLast edited by: Maizlow at: 11/1/2011 4:47 PM******EDIT****** New question arrised: |
|
11/2/2011 12:21 PM | |
Joined: 3/24/2009 Last visit: 7/9/2024 Posts: 535 Rating: (112) |
Dear Maizlow, instead of the IF-statements, you can use a CASE-statement: [code] CASE PROFILE_SELECTED OF 1: erg := SFC20(srcblk:= pAny1, dstblk:= pAnyOUT); 2: erg := SFC20(srcblk:= pAny2, dstblk:= pAnyOUT); : END_CASE; [/code] Best regards, yy1 |
11/2/2011 12:40 PM | |
Joined: 10/27/2011 Last visit: 8/15/2024 Posts: 13 Rating: (0) |
Thank you, that is better. I got another problem,I thought this way of doing it in SCL would work but I seem to have thought wrong. I tested with our test-plc we got here and nothinghappens. WhatI want to do is this: I have a DB, DB1, that is filled with 10 profiles + 1 "Selected profile", each profile is of data type UDT1, I wanna blkmov the profile that is selected in the HMI, say "Profile1" to "Selected profile" by doing it this way i thought i could accomplish that.The profiles has adresses 0.0-76.1 , 78.0 - 154.1 and so on. Anyone know what i have done wrong? Maybe I missunderstood Smiffy in THISpost. Anyone know of a way I can solve this with the way im trying right now or any other way in SCL? Code should be in attachment in OP. Best regards, Maizlow |
Last edited by: Maizlow at: 11/2/2011 12:41 PMBad spelling... |
|
11/2/2011 1:01 PM | |
Joined: 10/27/2011 Last visit: 8/15/2024 Posts: 13 Rating: (0) |
Hey smiffy! AttachmentSCL CODE.zip (617 Downloads) |
Last edited by: Maizlow at: 11/2/2011 4:15 PMUpdate for smiffy Last edited by: Maizlow at: 11/2/2011 1:13 PM |
|
11/4/2011 12:51 PM | |
Joined: 3/24/2009 Last visit: 7/9/2024 Posts: 535 Rating: (112) |
Dear Maizlow, with which parameter-values did you call your block? I think, that the 'SETUP_LOADERS' - input is false. If it's true, your WHILE-loop will never end. Best regards, yy1 |
11/4/2011 7:57 PM | |
Joined: 3/24/2009 Last visit: 7/9/2024 Posts: 535 Rating: (112) |
Dear Maizlow, currently I only can make a guess, because I don't have access to STEP7. What looks strange to me is the 'ByteAddressLSB '. The ANY-pointer contains an adress with BYTE and BIT-offset. So I think, that the DestAdress should be 780 * 8. Hope this helps Best regards, yy1 |
Follow us on