Siemens PLC S7-300 with CP 340

vipa_vinod

Member
Join Date
Feb 2008
Location
Bangalore
Posts
37
Hello


I am doing project with Siemens S7-300 PLC, CPU 313SC with CP340-RS232.

From CP340 to PC, it is communicating with RS-232 ASCII,

Any Instruction or Function block is there to convert REAL Value to STRING DATA
 
Look in:
Libraries > IEC Function Blocks > IEC > FC30 R_STRNG IEC

Text from Help file:
Description

The function FC30 converts a variable in REAL data type format to a string. The string is shown with 14 digits:

±v.nnnnnnnE±xx ± Signv 1 digit before the decimal pointn 7 digits after the decimal pointx 2 exponential digits
If the variable given at the return parameter is too short or if no valid floating-point number is given at parameter IN, no conversion takes place and the binary result (BR) bit of the status word is set to “0".

Parameter Declaration Data Type Memory Area Description
IN INPUT REAL I, Q, M, D, L, Const. Input value
RET_VAL OUTPUT STRING D, L Result string
You can assign only a symbolically defined variable for the output parameter.
 
Thanks for the suggestion, I tried & getting the String datas in Data Block. IF i give input as 303.303 real value, i am getting results in string with exponential i.e. 3.03303..e-3. But my requirement is, if i give 303.303 i should get same 303.303

Pls Suggest if any other option is available
 

Similar Topics

Hello. There is a problem with Siemens S7 300. We got a replacement PLC but it does not run the program from the MMC. The new PLC is dated 2011...
Replies
3
Views
689
Is there a version of Siemens software that can be used to view only the installed program logic and diagnostic buffer to determine system and bus...
Replies
5
Views
2,090
Dear Friends; We have a BOBST 1228 flexo printing machine having Siemens S7-300 PLC (6ES7 318-3EL01-0AB0) and Lenze 9300 and 9400 drives. The...
Replies
3
Views
2,305
I set the Date and Time of the S7 300 PLC equal to that of my PG. But after a few days I found that the date and time were not what they should...
Replies
0
Views
1,916
Hi Can any one give me some of sample project file for Siemens S7 300 PLC that I can practice at home. Thanks in Advance
Replies
2
Views
2,794
Back
Top Bottom