Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

Communication RS-485 on Digital Metering

Solved!
Go to solution

Hi all,

i have problem about communication serial on RS-485 using NI VISA. 

my problem is sometimes the data that must be read from power analyzer suddenly loss, can i skip that problem ? so if the data loss my program do not parsing-data from power analyzer, and then sometimes suddenly data is to high ( i think error on read VISA ) can i ignore it to ? 

i did many program and still not work correctly

Equal.jpg

Equal 2.jpg

sorry for my bad english.

this is my video please watch

https://www.dropbox.com/s/st6qs1cbtr72m0m/bandicam%202014-05-05%2015-06-09-546.avi

 

Thanks~

 

0 Kudos
Message 1 of 24
(6,780 Views)

Hi,

 

Do you use ModBus ASCII or RTU. Please post the VI for check and not a screenshot.

 

Kees

0 Kudos
Message 2 of 24
(6,763 Views)

this is my update, i compare on byte count, so if byte count is 49 then the program pharsing data, if else do nothing. but in this program sometimes byte count increase continously. i dont know why the byte count increase continously.

BYTE COUNT 3.jpg

 

0 Kudos
Message 3 of 24
(6,759 Views)

Hi,

 

You are using ModBus RTU. You should disable the termination character.

 

Kees

Message 4 of 24
(6,752 Views)

which one is termination character ? could you show me ? i am newbie on this Labview program

0 Kudos
Message 5 of 24
(6,749 Views)

is one of the inputs at 'Configure Serial port' VI. This is default true. You set it to false.

0 Kudos
Message 6 of 24
(6,745 Views)

Would be nice if you share the result with us.

0 Kudos
Message 7 of 24
(6,717 Views)

i've tried it and still not working. its made byte count stuck on 25. this is my screenshot

Enable T Char.jpg

 

and then i record video for you, i tried something, change the delay and it success made the count byte decreased, but it will increase again. please watch this

https://www.dropbox.com/s/0scz8c2c02pgoic/Byte%20Count%20Increase.avi

 

note : my VI still the same

 

0 Kudos
Message 8 of 24
(6,704 Views)

With the command you send the maximum number of bytes you will receive is 25. So I think it works just fine.

 

You send: 0A 04 00 00 00 0A 7176

 That is: slave 10 (0x0A), read register (0x04), starting at address 0 (0x00 0x00), read 10 registers (0x00 0x0A) + CRC (0x7176)

 

That answer is: 0A 04 14 xxxx CRC

 That is: 10 (0x0A), read register (0x04), number of transmitted bytes 20 (0x14), data 10 registers = 20 bytes + CRC

 

This adds up to 25 bytes.

 

 

0 Kudos
Message 9 of 24
(6,687 Views)

this is the video when i disable termination character 

https://www.dropbox.com/s/xvgk0eut4qvluai/Stuck%20Byte%20Count.avi

 

i change method to compare the first string must be read. this is my screenshot and can work perfect

PERFECT Modbus CVM NRG.jpg

 

 

 

but i want ask how to made a question on modbus, i've tried this modbus according in my manual device, this is the example on my manual device :

Example Question.jpg

on that example,  from address that I underline 0A 04 00 00 00 0A 71 76 it means first register and the number of registers to be read, isn’t right ?

 

Memory Map.jpg

 

But when I tried to read other parameter ( V, A, W, Var and PF on line 2 ) 

Memory Map 2.jpg

 

it didnt work, this is the result below :

Example 2.jpg

 

could you tell me what should i do to type in write buffer ? and please give me explanation

 

Thanks~

 

 

0 Kudos
Message 10 of 24
(6,683 Views)