08-01-2012 09:47 AM
Nowhere are you sending the termination charact - \n. What you are sending are the characters '\' and 'n\'. This has been discussed hundreds of times and the basic serial example shows the correct way. You must right click on the constant and select '\' Codes Display if you want to use \n as single control code.
p.s. Get rid of the bytes at serial port. With the VISA Configure Serial Port you have enabled the read to stop when a termination character is detected. The VISA Bytes at Serial Port is not used in this setting. You just wire in some high byte count.
08-01-2012 10:14 AM
I got rid of the bytes at serial port and I know that the commands that I am sending are correct because I have used them all in the basic serial read and write and have had success. That is why this problem is confusing me. I just ran my VI and got the following error:
Error -1073807339 occurred at VISA Read in Xitron Integration.vi
Possible reason(s):
VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.
08-01-2012 10:22 AM - edited 08-01-2012 10:25 AM
The controls in that example already have the display settings to '\' Codes. Set your constants to that also (right-click, '\' Codes Display) and you will see that you are actually sending invalid commands. The device isn't seeing the request for data, and therefore you get none.
I went ahead and cleaned up you code with changes made in this discussion (attached).
I can't believe I didn't see that earlier. Good call Dennis.
08-01-2012 10:43 AM
@jstrike21 wrote:
I got rid of the bytes at serial port and I know that the commands that I am sending are correct because I have used them all in the basic serial read and write and have had success. That is why this problem is confusing me. I just ran my VI and got the following error:
Error -1073807339 occurred at VISA Read in Xitron Integration.vi
Possible reason(s):
VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.
Your commands in YOUR vi are not correct and if you had simply right clicked as I said, you would have seen your mistake.
08-02-2012 10:19 AM - edited 08-02-2012 10:25 AM
Hi jstrike21,
Also, I don't believe that you need to use a sequence structure with that many frames. Since the VISA function have errors, that forces data flow. Since the wait function does not have error in/out terminals, it is common practice to encase the wait function with a sequence structure and pass the error wires through. Practicing this technique will ensure proper data flow without having to have a large sequence structure.
08-02-2012 02:52 PM
Jstrike21: I took the liberty of editing crossrulz submission and I attached it as a snippet. I think the problem is:
1. You send the start integration command before and after your wait. Does your device need to run some amount of time (the wait) before it is ready to respond?
2. I added a call to set the terminate read on receipt of termination character, so you don't receive a timeout error.
I hope this helps.
Bill
04-05-2013 01:19 PM
I am also currently working with the Xitron 2801 but I am currently trying to pull information I.E. volts amps watts every 0.5 seconds. The big problem I am facing is that the program just freezes up at random points during the test and you can't stop the test and does not produce any type of error; if you try to close the app it will say resetting vi:..... and you can't close that window. If you try opening another vi that requires a VISA application it will not work until you reset the computer otherwise there is just an error that pops up that says it can't access the VISA device. The frequency that this happens depends on the computer I am using and the computer I typically write the program on doesn't typically have any problems running this program. I think it has to do with how the Xitron interfaces with LabView. I am hoping someone here may have some experience with interfacing with the Xitron 2801 by sampling data at rates of 1 second or less. Or possibly have had similar problems elsewhere.
04-05-2013 02:42 PM
You put your message on a thread which has been inactive for 8 months and is not really realted to that thread.
Please start a new thread with your question. Mention that you had read this thread.
Post your VI. Do you have VISA installed on the computer wherethe problem occurs?
Lynn
04-08-2013 08:14 AM
Thanks for that John. It was the only discussion I found talking about the Xitron 2801, I made a new discussion for my question.