07-10-2012 05:49 AM
hello everyone,
I'm using DSC to communicate with a DELTA DVP28SV PLC. I managed writing to a coil to to turn a fan on, and I also wrote to a register.
However, when i tried to read the coil (same coil i just turned on) or when i tried to read a register that im very sure has values (the register where i configure the modbus parameters), it would return ZERO, even when i tried to read the register that i just wrote into the reply was zero (I am sure that writing to the register was successful because i made the specific value that i wrote to the register a condition to turning a light on).
So, anyone knows why this could happen?? the Registers are Read/Write. I thought it could be that the scan time in the PLC is too short so i added delays but anything i read still gives zero back. ideas? can anyone help me with this?
here's the PLCs application manual in case it matters : http://www.delta.com.tw/product/em/control/plc/download/manual/DVP-PLC-Program_O_EN_20120416.pdf
Solved! Go to Solution.
07-10-2012 07:29 AM
Are you able to post a picture of your block diagram? (in png format if possible)
07-10-2012 08:07 AM
sure.
it's just a testing diagram not real program.
001281 at the left is the coil
the others are just various data registers that i was trying. ones that should REALLY give a result are '404127' which im sure contains a temperature value all the time when i checked the PLC program.
writing the value 50 to 404298 turns a fan on but when i check it right after writing it says that the values is zero.
any ideas? i got stuck!
07-10-2012 08:08 AM - edited 07-10-2012 08:10 AM
here: capture.png shows the results i get
07-10-2012 09:49 AM
here's a clear version of the testing diagram :
1st frame writes to coil (it works)
2nd fram writes to register (it works)
3rd frame reads the register used in the 2nd frame (output is weirdly zero)
and this is wether the PLC is on or off.
does anyone have a solution for this?
07-10-2012 10:27 AM
Hi,
Try a delay before read.
Best Regards,
07-10-2012 11:28 AM
How are the shared variables set up in the library? Could they be set for Write Only?
07-12-2012 05:05 AM
Actually I solved this in time ^^ In case someone was facing the same issue and getting zeros in reponse, what worked for me is changing to programmatic access (by right clicking on the shared variable in my VI). why this works? no idea. but the variables started giving me the correct values.