Hello All,
I Have the following problem with Siemens SCL code View attachment FB2012.pdf.
This code should do:
It transform a DINT to String but also it made the string with constant lenght:
IF DINT=1 then String='00000000000000000001'
IF DINT=123 then String='00000000000000000123'
and so on.
The problem is that DI_STRNG(Siemens library function) should work in that way:
IF DINT=1 then String='+1'
IF DINT=123 then String='+123'
But its not work in that way in SCL.
I wrote another SCL Code View attachment FB2011.pdf When I Call DI_STRNG in STL/LAD/FBD and after that the second FB there is no problem.
I use PLCSIM 5.4 SP3 AND SCL 5.3 SP5.
If You see some error in my code please tell me.
The code is not optimized for best performance and it's not writen in FC because of that problem
Regards Mitko
I Have the following problem with Siemens SCL code View attachment FB2012.pdf.
This code should do:
It transform a DINT to String but also it made the string with constant lenght:
IF DINT=1 then String='00000000000000000001'
IF DINT=123 then String='00000000000000000123'
and so on.
The problem is that DI_STRNG(Siemens library function) should work in that way:
IF DINT=1 then String='+1'
IF DINT=123 then String='+123'
But its not work in that way in SCL.
I wrote another SCL Code View attachment FB2011.pdf When I Call DI_STRNG in STL/LAD/FBD and after that the second FB there is no problem.
I use PLCSIM 5.4 SP3 AND SCL 5.3 SP5.
If You see some error in my code please tell me.
The code is not optimized for best performance and it's not writen in FC because of that problem
Regards Mitko