HMI variable

kreacher

Member
Join Date
Jun 2015
Location
Iasi
Posts
21
How can you use a LREAL variable in an S7-300? I need to represent a really big number but i cannot find the option to create the LREAL.
I have converted 2 DINT variables into REAL ones and i want to represent them into a LREAL number. The final number will look like this
XXXXXXXXX.XXXXXXXXX where the first 9 X will be the first REAL and the last 9X the other REAL. I though of converting the DINT to real and then multiplying the first number with 10^10 then adding to the other number but it does not work.
 
Last edited:
Or how can i combine two real numbers each with 9 decimals to create 1 real number and keep the order because as you see above the the first real number counts until it reaches a certain value and then it resets and increments again from scratch.

L.E. i've done some research and seeing as a REAL number can hold up to 3.402823e+38 i think my max number will fit in quite nicely but the real problem is how do i make 1 REAL number out of two?
The first number counts a signal up to a certain point where it resets and increments the second number every time it resets.
Real = RealHigh *10^10 + RealLow. But how do i make this? The max of the total Real must be at least a number with 19 letter in total (9* 10^18)
 
Last edited:
Just curious, whats the need for such a large number?

If it's just for display and not much in the logic then possibly convert the 2 DINTS to strings and concatenate?? Obviously presents issues if you're doing a bunch of math functions, but if it's just something like an identifier number maybe it could work.
 

Similar Topics

Hello, I have a question, is it possible to display an editable table on an HMI interface? Basically I have a variable: "Dist_Control" with an...
Replies
3
Views
871
Hello, I have a Mitsubishi FX3G 14M PLC and a E615 HMI from Mitsubishi/Beijer. I'm using GXWorks 2 to do the programming and I have no problem...
Replies
2
Views
22
Good people of PLCs.net, I am currently working with an HMI that is advantech 1250H, that communicates with a 1769 Compact logix and Currently...
Replies
2
Views
70
Hello all, I know its not good practice to have duplicate destructive bits when writing plc code, but I'm wondering about writing to the same tag...
Replies
2
Views
112
Hi All, As a precaution my company has been collecting copies all the HMI and PLC programs. I have recorded copies of most of our sites...
Replies
0
Views
72
Back
Top Bottom