Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

read Counter register from PLC (LG) LSIS Master K120S(E) via ModbusRTU

hi guys,

i made program to read the present value of Counter function on my PLC LS K120S(E) via modbusRTU, i have error code  6002

this is my simple ladder, ladder plc  ls.png

CTR function move to register D1023 that i want to read on myLV,

this is my LV program :

labview plc ls.png

i have make sure that my hardware and software communication is correct (Slave number, baud rate, Com port)

this is the register mapping, am i wrong about the register ?

register plc ls.png

i attached the manual of PLC LSIS K120S(E)

please help me whats wrong on my program ? thanks....

0 Kudos
Message 1 of 8
(8,264 Views)

Hi rhiesnand,

 

Modbus exception code 2 just means that the data address queried is not allowable on the slave. From what you posted, it looks like your serial settings are not causing the issue.

 

So, it might just be a matter of making sure you're querying the right register address on the slave.

Andrew T.
"His job is to shed light, and not to master" - Robert Hunter
0 Kudos
Message 2 of 8
(8,215 Views)

Hi,

 

Did you also tried to read another address and 1 register. Like address 0 ?

 

You read at 0x3E8 but the screenshot says this is the data at address 0x3FF (1023)

 

Kees

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

when i read 0 register the connection is good, no error report. i attach my video

https://drive.google.com/open?id=0B_94Z4CwsTYeb0V4OWxSZTV5X2s

 

i did  it according the manual, the register D1023 is mapping to 0x3E8, but when i change to 0x3FF it gave error code 6002 too. 

3ff.png

 

i attach my vi,hope you can help me to solve this problem,thanks

0 Kudos
Message 4 of 8
(8,177 Views)

thanksfor your reply, i did the correct set up on my plc, you can see my  video.

https://drive.google.com/open?id=0B_94Z4CwsTYeb0V4OWxSZTV5X2s

0 Kudos
Message 5 of 8
(8,175 Views)

If the communication is OK it is a user problem and not a LV problem. 

I don't have the time to read the manual of almost 300 pages.

0 Kudos
Message 6 of 8
(8,164 Views)

I know this is an old post. I have a problem: I have a machine that is about 12 years old with an old plc that I need to get its program out so I can program a new plc. The company that made the machine no longer have a copy of the file but they did have a copy of the plc manual. I was researching to see if any had any idea of how to pull a program and it looks like you have already done it. Could it be possible to share the VI's. 

0 Kudos
Message 7 of 8
(5,045 Views)

Hi, 

 

Does the manual contains a chapter with the ModBus commands ?

If there is,is there a command to read to program from the PLC ?

 

Kees

0 Kudos
Message 8 of 8
(5,037 Views)