10/28/2019 2:30 PM | |
Joined: 12/18/2014 Last visit: 6/5/2023 Posts: 29988 Rating:
|
This FB from the S5 program can't convert to S7. |
10/28/2019 2:32 PM | |
Posts: 4 Rating:
|
So how can i do ? What does dual mean ? What is the similar programation for S7 ? |
10/28/2019 2:48 PM | |
Joined: 12/18/2014 Last visit: 6/5/2023 Posts: 29988 Rating:
|
The FB cobnverts in S5 a integer value to BCD value. In S7 classics can you make it with the convert command "I_BCD". See attachments. AttachmentPDFs.zip (253 Downloads) |
10/28/2019 2:51 PM | |
Posts: 4 Rating:
|
Ty ixo65 for your answer. It help me and i understand better. How can i write it in list ? |
10/28/2019 2:56 PM | |
Joined: 12/18/2014 Last visit: 6/5/2023 Posts: 29988 Rating:
|
In STL is the command "ITB". L "integer_value" |
10/28/2019 3:02 PM | |
Posts: 4 Rating:
|
SO CALL FC 82 ( DUAL := MW244 , SBCD := M255.0 , BCD2 := MB247 , BCD1 := MW242 ); BECOME CALL FC 82 L MW242 ITB T MW244 This is that ? |
10/28/2019 3:34 PM | |
Joined: 12/18/2014 Last visit: 6/5/2023 Posts: 29988 Rating:
|
I see, you have not understand. The S5-FB makes a BCD value with 6 places, the sign is in "SBCD". The "ITB" command makes a BCD value with 3 places, the sign are bits 12-15 in the BCD word. The integer value is in your case not MW242, because it is MW244. With the ITB command you can't convert integer values greater 999. Is the integer value greater 999, then you must use the command DTB (see attachment). Then you must first transfer the integer value to a double integer value. Code: L MW 244 (interger value greater 999) AttachmentDTB.pdf (225 Downloads) |
4/28/2021 3:31 PM | |
Joined: 4/16/2021 Last visit: 2/23/2022 Posts: 33 Rating:
|
Hazem MHEDHBI Please, can you anwser me why you have introduced the line T MD300 (BCD value) and what does it mean ? |
Follow us on