Last visited

Community Reputation

About Gville

Profile Information

I am working on a project with two M340 PLCs and need to read a Real type data point into my PLC from the other. I have setup my READ_VAR block to do this, but I'm having trouble understanding the form of the output. I get that a Real type takes two registers and that each register will be read into a part of an Int Array through the READ_VAR block, but how can I now convert it back into a Real so I can use it in my logic? This is just a fundamental thing that I can't get my head around, maybe I've already read the answer somewhere online but it isn't making sense to me.
This also needs to read an updated value every second because it is being used for an interlock. Do I use a TP to enable the READ_VAR this way?

Yes, I did find that last night though now I'm running into another issue. I would like to separate the hours and minutes so that I can have a single Real value for the hour of day. I found the LEFT_INT and RIGHT_INT blocks to separate the the data from the string, but when I change from Integer to String I get some additional data in front of my number (+0) which is making it hard to get to the hour value. How can I either remove or ignore the +0 prefix?

Hi, very new to PLC programming and desperately looking for some help to finish my project!
I need to program a pump to run based on the level in a holding tank. The start/stop set points change throughout the day based on the time. For example, function for the start set point is 1.15372×10^-6 x^6 - 0.000114068 x^5 + 0.00448866 x^4 - 0.0883477 x^3 + 0.877893 x^2 - 3.57417 x + 7.5, where x is in hours. How can I access the PLC time (current hour and minute) so I can use them to calculate the set points? Does Unity Pro XL have pre-defined variables for these?