i have try the program but its has some flaw to it....the D300 is the input value of the scale voltage right? I assign the D300 to the voltage scale and its goes error....i think because its overlapping with the input data in the register.....this is my theory idk its right or wrong.....need your feedback....Here it is for an FX2N/FX2NC with its particular floating-point instructions. It works; like I said, that is an implementation detail.
Caveats
- The D> D300 D100Z1 in the six binary rungs should be DECMP D300 D100Z1 M7(being careful to avoid M10!),
- but then I would have had to fiddle around with M9, and I am a lazy sod,
- Anyway, D> ...is functionally equivalent,
- as long as all the floating-point table entries are non-negative,
- because exponent bits are more significant than mantissa bits.
- The DMOV D200Z0 D308 could be DEADD D200Z0 K0 D308 to show the floating-point value, but it moves the bits either way.
Did I forget to latch the table values?Brian, there is another problem with your code, It's fine when you first download it, then if you stop the PLC (well the simulator i.e. switch it to stop) then back to run it all goes belly up the returned values are not correct.
i have try the program but its has some flaw to it....the D300 is the input value of the scale voltage right? I assign the D300 to the voltage scale and its goes error....i think because its overlapping with the input data in the register.....this is my theory idk its right or wrong.....need your feedback....
p/s :: I don't know anything...im just a baby
I am still trying to get my sea legs navigating around GxW2!Nice one Brian, how about more comments also when printing remove the cross ref etc. it distracts from the code.
You have to [Onlinine]=>[Write to PLC]=>[Device memory {✔}]=>[Execute] to reload the memory (I have to do that every time I start the simulator as well). Is there a better way to handle this? Why doesn't GxW2 download the memory to begin with?Brian, there is another problem with your code, It's fine when you first download it, then if you stop the PLC (well the simulator i.e. switch it to stop) then back to run it all goes belly up the returned values are not correct.
Why doesn't GxW2 download the memory to begin with?
You have to [Onlinine]=>[Write to PLC]=>[Device memory {✔}]=>[Execute] to reload the memory

It was already working properly in the simulator as of Post #71.Here you are Brian It works properly now in the simulator ...