LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

bytes at serial port

Qusestion : while using visa functions i am using the property bytes at serial port . problem is some times i am getting bytes correctly and some times the output of bytes at serial port is 0 . what might be the problem. 

 

I gave delay also 500 seconds to read and termination character as false , time out 500 ms . 

 

help me out 

0 Kudos
Message 1 of 12
(6,166 Views)

It is difficult to help without more information.

 

What kind of device or instrument is it? Does it stream data or does it use a command/response system? 

 

Are you sure the instrument is sending data when you see 0 bytes at port?

 

Please post your code.

 

Lynn

0 Kudos
Message 2 of 12
(6,160 Views)

Here is the code . I am using this as a sub.vi to my main code . so i am not attaching main code i am just attaching sub.vi 

 

I am using Rs 232 serial communication . ( modbus protocol )

 

I this code some times when i send the request output response is coming correctly and some time bytes at serial port

are zero. this is happen reguarly. 

 

I attached my crc code also what i am using .

 

Download All
0 Kudos
Message 3 of 12
(6,156 Views)

I cannot open your VI.  Can you save it for a previous version (10)?

 

Lynn

0 Kudos
Message 4 of 12
(6,148 Views)

 I dont know How to do conversion but i will try as soon as possible and i will post again .

presently i am using labview trial version for 30 days

0 Kudos
Message 5 of 12
(6,132 Views)

File>Save For Previous Version.

 

Why aren'y you using NI's Modbus Library?

0 Kudos
Message 6 of 12
(6,129 Views)

Thank you  sir.

 

Here is the converted code to 10 version.

 

As a begginer of labview i dont know what is ni modbus library

Download All
0 Kudos
Message 7 of 12
(6,122 Views)

i occasionally got the same problem for serials communications, and i don't think this phenomenum comes from application level.

i solved them via simply replacing the serials cable or serials-usb cable by a more conductive one.

0 Kudos
Message 8 of 12
(6,111 Views)

@mahi108 wrote:

Thank you  sir.

 

Here is the converted code to 10 version.

 

As a begginer of labview i dont know what is ni modbus library


This

0 Kudos
Message 9 of 12
(6,104 Views)

Hi,

Read fix number of bytes instead of byte at port node.

 

PBP

Labview 6.1-2010

KUDOS ARE WELCOMED

PBP
Labview 6.1 - 2019
0 Kudos
Message 10 of 12
(6,062 Views)