LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

URGENT DSC: I can write to shared variables but CANNOT read them?

Solved!
Go to solution

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

0 Kudos
Message 1 of 8
(3,365 Views)

Are you able to post a picture of your block diagram? (in png format if possible)

Please remember to accept any solutions and give kudos, Thanks


LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7
0 Kudos
Message 2 of 8
(3,349 Views)

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!

0 Kudos
Message 3 of 8
(3,341 Views)

here: capture.png shows the results i get

Download All
0 Kudos
Message 4 of 8
(3,339 Views)

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?

0 Kudos
Message 5 of 8
(3,321 Views)

Hi,

 

        Try a delay before read.

 

Best Regards,

Luis A. Mata C.
Ing. Electrónico
Whatsapp: +58-414-1985579
BBM Pin: 2B83E99A
Thanks: Kudos
0 Kudos
Message 6 of 8
(3,303 Views)

How are the shared variables set up in the library?  Could they be set for Write Only?

0 Kudos
Message 7 of 8
(3,296 Views)
Solution
Accepted by topic author nura91

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.

0 Kudos
Message 8 of 8
(3,259 Views)