Posted 27 May 2022 Hi guys, So I want to divide two D value and comparing the result to setpoint and trigger alarm accordingly. Most the time, the result of the division will come out with decimal point. I am not familiar how to deal with decimal, floating, integer, etc before this. I try to do as below, actual result is 1.666. D8100 - 1 , D81001 - 6 How do I properly put decimal value in D and to show in HMI? Thanks! 1 person likes this Share this post Link to post Share on other sites
Posted 27 May 2022 (edited) Hi See attached example Edited 27 May 2022 by Theuns 3 people like this Share this post Link to post Share on other sites
Posted 30 May 2022 Alternatively moist HMI have an offset gain function or can add a decimal point Like the Mitsubishi GOT. This way you can keep working with integer values in the PLC 1 person likes this Share this post Link to post Share on other sites
Posted 31 May 2022 21 hours ago, Gambit said: Alternatively moist HMI have an offset gain function or can add a decimal point Like the Mitsubishi GOT. This way you can keep working with integer values in the PLC Actually, I am using GOT2000. Wonder how this one works, so that I may know some additional method. This one will use 2 D value and show at HMI? On 5/27/2022 at 6:58 PM, Theuns said: Hi See attached example Thank you very much! Share this post Link to post Share on other sites
Posted 31 May 2022 (edited) In this example you can see that the Data Type is Integer (signed 16 bits) but the display format is Real. with the Digits (fractional) you can choose the decimal point location. In the preview you can see the result. Edited 31 May 2022 by Gambit 1 person likes this Share this post Link to post Share on other sites
Posted 2 Jun 2022 On 5/31/2022 at 1:50 PM, Gambit said: In this example you can see that the Data Type is Integer (signed 16 bits) but the display format is Real. with the Digits (fractional) you can choose the decimal point location. In the preview you can see the result. Thank you! WIll keep this in mind in future. Btw, integer in PLC cannot read decimal right? They required two D register, how do I compared them in PLC with single integer from HMI. Eg, from calculation, result is 1.35. Register at D1 = 1 and D2 = 35. How do I compare with SP from D3 = 1.35? Share this post Link to post Share on other sites
Posted 2 Jun 2022 PLC can read decimal / real. just change the data type use the floating point instructions E..... Share this post Link to post Share on other sites