S7- 1200 analog scaling

franchois13

Member
Join Date
Nov 2008
Location
london
Posts
76
Hi Everyone,

Anyone please help me figure out how can I have at least 1 decimal place for the scaled value?
I am using 0-10 V input to measure room temperature using normalise and scale function but will need 1 decimal place in the scaled output. I am only getting whole numbers.
I am using analog input Cpu 1214c.
Thanks in advance.
 
I have done exactly the same as above as shown on the sample and using real data type but still having just whole number.
 
The first Scale_x you are converting from Real to DInt. Also you are using a MW for the result.
The Second Scale-x you are using a MW for the result.
Look again at the example image I posted.
 
Check the data types of both Prod_1_scaled and Pod_2_scaled. I think you'll be surprised. They need to be reals for them to have decimals.

Hint: reals require 4 bytes (MD), so your MW tags can't be the right data type.
 
Yes changing data types to MD give me the result I need.
I have further question though. The average value of the reading is displayed to a mitsubishi HMI got2000. I will need to change the data type and address on the device setting but I cannot find anything to change it to MD. I can only find IW, QW, DB, MW and some other that I could not recognise.
Thanks for your help so far.
 
I think you would benefit from learning how to use integers in code and to shift the decimal point in the HMI. Every HMI support this.

Thanks for the idea, I need to find a different way as it is not straight forward to connect two devices of different make. Need to do some readings. Thanks.
 
Thanks for the idea, I need to find a different way as it is not straight forward to connect two devices of different make. Need to do some readings. Thanks.

have a look at the images - for the S7 300/400 range - My GTD 3 is older so does not have S7 1200 range but should be similar.

GTD3.jpg GTD3-2.jpg
 
I think you would benefit from learning how to use integers in code and to shift the decimal point in the HMI. Every HMI support this.

I've never seen an HMI automatically shift an INT into a decimal. Is this common? I use reals whenever I need decimals.

Fixed point math gets complicated quickly.
 
have a look at the images - for the S7 300/400 range - My GTD 3 is older so does not have S7 1200 range but should be similar.

I started modifying the program to use DB and is looking promising on 1 simple trial I made on the Mitsubishi hmi. Will post back if everything is successful.
Thanks.
 

Similar Topics

I have a 4-20mA level input that needs to be controlled (PID). But the level transmitter is configured such way that 4mA correspond to 100%(full)...
Replies
7
Views
3,935
I need help achieving the following task: ML1200 sending 4 to 20 mA thru analog output ch0 to a DC speed controller analog input(4 to 20 mA) my...
Replies
3
Views
681
Pretty simple question, but I was wondering how I can set the Analog Output 1 of an S7-1200 (DC/DC/Relay) to be proportional to a data tag. I...
Replies
1
Views
855
Guys, i need your help.. Im using S7-1200 CPU1212c AC/DC/RLY and for my project, i want to learn how to program this in analog inputs.. Im using...
Replies
3
Views
2,460
hi I have s7 1200 analog input module 4-20MA , I need a help to scale the temperature from the transducer that measure 0- 100°C to the hmi...
Replies
3
Views
2,962
Back
Top Bottom