09-10-2011 09:48 AM
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
09-10-2011 10:35 AM
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
09-10-2011 11:48 AM
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 .
09-10-2011 12:16 PM
I cannot open your VI. Can you save it for a previous version (10)?
Lynn
09-10-2011 11:45 PM
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
09-10-2011 11:54 PM
File>Save For Previous Version.
Why aren'y you using NI's Modbus Library?
09-11-2011 12:16 AM
Thank you Dennis sir.
Here is the converted code to 10 version.
As a begginer of labview i dont know what is ni modbus library
09-11-2011 04:07 AM
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.
09-11-2011 09:24 AM
09-12-2011 10:25 AM
Hi,
Read fix number of bytes instead of byte at port node.
PBP
Labview 6.1-2010
KUDOS ARE WELCOMED