04-18-2012 12:05 PM
Hi,
I've made a really simple application using Serial read/write RS232 VI on LV, it is suposed to send a 32bytes and wait for 1 byte, then send another 32 bytes, and that goes on until the end of the archive. This application works perfectly fine on my computer.
The problem is, when i change computer the app. doesn't work properly, it send the byte "2" forever! What is missing on the other computer? i've already instaled VISA 5.1, run time 2011 and system configuration drivers and it still doesn't work! Could ir be there is something wrong the way i made this app?
I use Labview 2011 32-bits.
Pleaasseee heeeelllpp meee
04-18-2012 12:51 PM
Please attach your VI. Without seeing your code it is very difficult to guess what might be wrong.
04-18-2012 02:03 PM
The code works like this:
it send a 0x01 and waits till it receives 0x06
it send a 0x02 and waits till it receive 0x06 again,
then it should start to send the 32bytes of data, and here is where the problem begins:
after the 0x06, it should send 32 bytes and wait until receiving 0x03 (error- repeat data sequence) or 0x06 (OK - go on with the data bytes)
them it should send another 32 bytes and keep going till eof.
But it does not! It sends 0x02 and then waits for the 0x06 send "22" and waits if u send 0x06 it send "222222222222222222222222222222..."
04-18-2012 04:05 PM
Please attach the whole VI. The picture you attached does not even show some of the functionality you described - where does it send the 0x01? Where does it send 0x02? How are you determining what the code is sending?
Does the file that you're reading exist in the same location on both computers? If the file doesn't exist, you could get an empty string array, in which case the loop will probably never terminate (the array length will be 0 and the output of the addition will always be greater than that).
Remove the sequence structure - it is unnecessary. Also, do not configure and close the serial port on every loop iteration. Do each of these operations just once, outside the while loop.
04-18-2012 05:00 PM
Nevermind, I figured it out. The other computer wasn't having time enough to catch the byte.
Thanks for the attention thought