show the entry list
STEP 7 (TIA Portal) -- Creating S7 programs -- Executing operations
How do you filter only the places before and after the decimal point from a real value in STEP 7 (TIA Portal) V11?
How do you calculate the linear values for the y-coordinate of point P in STEP 7 (TIA Portal) V11?
How can you add together physical flow measurements (mass flow rate, for example) to a total value in STEP 7 (TIA Portal) V11?
How do you implement numerical differentiation in STEP 7 (TIA Portal) V11?
How do you convert data types in the TIA Portal for the S7-1200/1500?
How can you convert a hexadecimal number into ASCII characters with STEP 7 (TIA Portal) V11?
How can you determine the bit position of an active bit in a marker word with STEP 7 V11 and monitor a 32-bit field?
How can you delay the output signal in relation to the input signal in STEP 7 (TIA Portal) V11?
In STEP 7 (TIA Portal) V11, how can you scale integer values in real numbers and real values in integer numbers for analog measurements?
How do you copy memory areas in STEP 7 (TIA Portal) V11?
How in STEP 7 V11 can you access the unstructured data types bit-by-bit, byte-by-byte or word-by-word and symbolically?
How do you program the overlapping of tags with the keyword "AT" in the TIA Portal V11?
How do you program a pulse encoder in STEP 7 (TIA Portal)?
How do you program a shift register with the LAD/FBD statements in STEP 7 V5.5 and in V11?
What properties do you have to watch out for in STEP 7 V11 when you are inserting characters into a string with the "INSERT" statement?
How can you convert a hexadecimal number into ASCII characters with STEP 7 (TIA Portal) V11?
Part number:

Description
The STEP 7 (TIA Portal) V11 program "STEP7_V11_Hex_ASCII" converts a hexadecimal number into ASCII characters. The two functions "DataCalc" and "HexAscII" store the separate characters in ASCII format in data block DB1. These variables of the data type "Char" have a length of one byte.

  • The "DataCalc" converts the data byte for byte from the hexadecimal format into the ASCII format.
  • The "HexAscII" function is for the byte-for-byte preparation for data type conversion with the FC "DataCalc" and for saving the data in DB1.
  • The FC "DataCalc" is called once in the FC "HexAscII" for each conversion to the character type "CHAR".


Fig. 01

Fig. 01 shows an example of how the control value "ABC1 23DE" (hexadecimal format) and the individual characters in ASCII format are stored in DB1. The attached download contains an archived STEP 7 V11 project with the STEP 7 program described above including the German and English comments.

Copy the "STEP7_V11_Hex_ASCII.zip" file into a separate directory and then start the file with a double-click. The STEP 7 project is now unpacked automatically with all the associated subdirectories. You can then use STEP 7 V11 to open and process the extracted project.

STEP7_V11_Hex_ASCII.zip ( 6816 KB )

Creation environment
The screens and download in this FAQ response were created with STEP 7 (TIA Portal) V11+SP2.

 Entry ID:48743464   Date:2012-05-22 
I regard this article....as helpfulas not helpful                                 
mySupport
My Documentation Manager 
Newsletter 
CAx-Download-Manager 
Support Request
To this entry
Print
Create PDF 
Send to a friend
QuickLinks
Compatibility tool 
Help
Online Help
Guided Tour