05-01-2015 05:36 AM
dear all,
can anyone tell that what is the problem in this vi as read function is not responding in VISA. i am trying to send some command to power sensor through VISA
thnaks
05-01-2015 06:23 AM
Hi,
Post the VI. The picture does not show how you configured the port. Also tell which protocol you are using.
Kees
05-01-2015 06:47 AM
i am posting vi
05-01-2015 07:09 AM
What is the power sensor? What is the command you are sending it? Are you sure you shouldn't have the termination character on?
Some general notes:
1. No need for the second loop. You can handle all of your GUI actions in a single loop with 1 event structure.
2. You should avoid using local variables so much. You can use the terminals
Ok, just found where you are generating the commands to send. You are not terminating your commands properly. You are sending the ASCII characters '\' and 'r' when you should be sending a carriage return. Change your constants to be in "\ Codes" view. Then you can use the "\r" to mean a carriage return.
And since the commands use the carriage return for a termination character, I would be willing to bet that the responses will be doing the same. So enable the termination character and set it to be the carriage return (decimal value of 13). You can then get rid of the wait and the Bytes At Port. Just tell the VISA Read to read a number of bytes that is a lot larger than the size of a response message you would ever expect.
05-06-2015 06:18 AM
thanks for your kind suggestion it solved my problem. now i want to know one more thing that how can i incorporated timer for 22 second. beacause there is option for zero setting which send the ZS command to device and device goes into zero mode for 22 seconds and then only ZQ command can be sent which showa the status of the device either completed or not.
once agan thanks for your valuable sugestion.
05-06-2015 06:55 AM
i am posting vi. can you tell why sub vi in zero mode of ok event in event structure is not showing timer on main vi
05-06-2015 07:01 PM
Sounds like you will want to make a state machine. I would just use the Elapsed Time express VI to know when the 22 seconds are up.
05-08-2015 06:52 AM
dear thnaks for your valuable sugestion . i am using elapsed time vi but it is not running . i need to count 22 seconds and show it on front panel. meanwhile during counting i need to send command and recieve to device. will i able to do that and how. please neeed your help. once again thanks for suggestion