11-13-2012 04:33 PM
11-13-2012 10:28 PM
Look at the Serial Read and Write examples in LabVIEW for some ideas. You don't want to use Write Port. You want to use VISA Write to send data, and VISA Read to receive it. You can certainly read the file in LabVIEW, then it is just a matter of using VISA Write to send parts of it at a time. Since a file is probably too big to write all at once, you'll need to do it in a loop sending parts of it at a time. I don't know what makes Xmodem protocol special, whether it is a way to encode bytes or to handle handshaking so you don't write data too fast before the receiver and read it. What is on the other end of the serial connection that you are communicating with?
I don't know what you mean by the file size being different. 976,128 bytes is 953.25 kB (divide by 1024). That is very close to the 954 kB number you listed.
Also look at TCP/IP data server and client. It will give some good ideas on how to send data.
11-13-2012 11:20 PM
11-21-2012 09:10 AM
Hi Dennis,
Thanks for the response. Just got back to the project again.
I have more questions about the hyperAccess:
Does HyperAccess has a llb that I can use? Does this have a send file function with modem protocal selection that I can use? I'm pretty new in this area. If possible, do you have an example?
Thanks a lot!!!
Weny
11-21-2012 09:49 AM
No, it does not come with a LabVIEW driver. Yes, it has send file functions in it's DLL. I do not have an example, sorry. I used the ActiveX interface directly in TestStand so I never wrote any LabVIEW functions.
11-21-2012 10:34 AM
Got it. Let me try. Thanks anyway!
Thank you guys very much for helping!!!
-Wen
02-14-2013 01:26 AM
Hi,
I too have the same requirement "Writing Binary file in XModem Protocol", Can you share any example vi for Xmodem protocol.
Thanks & Regards
E.SundarRajan
02-14-2013 11:29 AM
I didn't make it work. I endup found a VB code of xmodem and build an exe and then using system Exec.vi to call it.
02-14-2013 11:43 AM
Did you do a search for xmodem? You would have found a link to this.
02-14-2013 11:48 AM
I got that. The problem I met is when I read my binary file in Labview, Labview added some extra Chars into it which messed up all the data. So I simply give up the whole thing and use vb instead.