Hey all. Very low stakes question… For two program sections, I originally labeled them as:
Analog Inputs (4 - 20 mA = 4000 - 20000)
Analog Outputs (4 - 20 mA = 4000 - 20000)
While perusing the code doing some clean up, I thought one of these should be opposite (4000 - 20000 = 4 - 20 mA). However, I’m not sure which one it should be. I initially changed the outputs to raw count first, but I’m second guessing that now. What opinions do you have? Thanks.
P.S. should “Low Stakes” be an optional forum tag?
Kind of a philosophical question, but I think the answer to the question is trivial if we first know the answer to this question: what do the left and right sides of the equals sign represent?
For example, if left to right is the order of the conversion, call it upstream-to-downstream, then 4k-20k=4-20mA is for the outputs, i.e. the output value will be scaled to the range 4k-20k in an integer/word location in PLC-internal memory mapped to that input, which is on the left, upstream side of the equals sign, and the PLC I/O system will convert the value in that mapped location to a 4-20mA electrical signal on the physical output pins, which is on the right, downstream side of the equals sign.
Or, if the left side represents the electrical signal, whether input or output, and the right side represents the integer/word value in PLC-internal memory, then both are obviously 4-20mA = 4000-20000.
At the end of the day I would understand either just fine.
I would be inclined to follow “order of the conversion” as @drbitboy put it, as I feel that’s closer to how my brain would follow the flow of information. IE the input has 4mA on it, so that’s 4000, or the PLC output word is 20,000 so that’s 20mA.
Thanks all. When something like this is the most pressing issue, I suppose the code is pretty clean and I can move on to something else. For clarification, these are above groups of scaling AOIs in ladder mapping engineering units that might be 0-100%, 0-5 inches, etc. with the analog module points setup for 4000 to 20000.
I agree that “order of conversion” makes sense. The phrase I had in mind was “signal flow”. Later I had an intriguing idea, but someone who didn’t know ST wouldn’t ‘get it’ and operand order is still debatable:
Analog Inputs (4000 - 20000 := 4 - 20 mA) follows the order of conversion but phrasing it as “is assigned” makes it sound backwards.