Does anybody out there has a manual/description about the SIEMENS FC107 standard analog in function? I have the function itself but can't get the variables right.
Hello benji;
MDxxx only tells the compiler to reserve 32 bits for your operation (at a correct boundary address). It does not imply the format these 32 bits should use; they could be integer format (DINT), floating point(REAL), TOD....
Either use the Symbol editor from the program folder (or access it from the ladder editor by right-clicking the address MDxxx and set this address as a REAL value 9with a symbolic name).
This does not happen when you create a datablock register, because you automatically create a symbolic name for the variable, and you set its datatype.
Well, if you've got the function, you've got the online Help and that describes how the FC operates. Can we be absolutely clear what you're trying to do with FC107? This is an FC designed to mimic old S5 functionality in an S7 environment. If you are using S5-style analog I/O with an S7 CPU then you're on the right track, but when it comes to using S7 I/O with an S7 CPU even Siemens aren't so perverse. Just use the IWxxx address of the input channel you want to read. No need to use FC107 simply to retrieve the value.
I don't mean this function. It is another function also called FC107 (coincidence?) which reads the raw value scales it to engineering units and also has the ability to work with simulated values by setting a single bit.
It should be a standard SIEMENS function but I am not sure about this anymore.
Anyway I don't need the simulation part yet and I've already found another function on this forum that can do exactlty what I need at this moment.
I think the simulation part is easy for start up purposes and I will continue with it later.