07-15-2021 09:04 AM
Good day.
I want to communicate an ANSER U2 proS printer by serial port (usb) with OPEN VISA and I have the error 1073807339, change the number of bytes to read up to 999 and the time out to 44 seconds.
When using the "serial port utility" program, the response takes 43 seconds.
The instruction I send is in Hexadecimal: 02000200F0F203 (Production line reset) to obtain the data and printer number, but I only get the error message
Hopefully you can guide me.
Greetings.
Solved! Go to Solution.
07-15-2021 10:32 AM
Greeting, Orozco.
First of all, there is no Error 1073807339. Did you mean Error -1073807339 (Hex 0xB4440015), a VISA error "Timeout expired before operation completed"?
If you are going to communicate with a Serial device using VISA in LabVIEW, I strongly recommend that you open MAX, find your Serial Device under "Devices and Interfaces", and try communicating with it. You can play with the various Serial parameters, such as Baud Rate, Parity, etc. and learn what settings allow communication with LabVIEW.
To help us understand what you are doing and make sensible suggestions, please attach the LabVIEW code (as <filename>.vi, please, not as a picture of part of the Block Diagram). Since you also didn't mention the version of LabVIEW you are using, I should also note that not all of us are using LabVIEW 2020 ...
Bob Schor
07-15-2021 04:56 PM
Bob Schor
I apologize before continuing.
I use labview 2020.
Try with MAX, I share the images of the results, the code that I use and the information that the seller of the equipment gave me.
When testing with MAX I have time out and read STB operation warnings, I moved the speed from 57600 recommended by the manufacturer to 9600 and others without results, the waiting time changed to 55 seconds, without results.
In Labview, go back to the "simple serial" example, I get the "time out" warning, I share the code.
Communication is through DB9- usb serial adapter (ch30) I share the pinout
Thanks for your help.
07-15-2021 08:20 PM
I VERY highly recommend you go watch this video: VIWeek 2020/Proper way to communicate over serial
The guy really knows his stuff. 😋
Seriously, the second half of that video will show you how to handle your protocol. But some summary points:
1. Turn OFF the Termination Character (input on the top of the Configure Serial Port). You are dealing with a raw/binary/hex format, which means you do not have a termination character. This is why you are getting your error.
2. I recommend reading 1 character at a time until the STX (0x2) is read. From there, read 2 bytes to get the length (use Unflatten From String to convert the two bytes to a U16). Add 2 to the read length and read that many bytes to get the rest of the command. You should then perform the checksum operation and verify the received checksum is correct as well as make sure the last byte is ETX (0x3). If something is wrong, throw the data away.
07-22-2021 09:54 AM - edited 07-22-2021 09:55 AM
Hi
Thanks for your help, the issue was resolved with the support of the equipment supplier, I passed information about a password that we did not have in the information when the purchase and a setting that is not in the equipment operation manual (string table: default)
I share the VI (Labview 2020) as mere information.
The equipment in question is, ANSER U2ProS Printer
07-29-2021 04:02 PM
@Orozco_1 wrote:
Hi
Thanks for your help, the issue was resolved with the support of the equipment supplier, I passed information about a password that we did not have in the information when the purchase and a setting that is not in the equipment operation manual (string table: default)
I share the VI (Labview 2020) as mere information.
The equipment in question is, ANSER U2ProS Printer
Is it possible to save your VI for LabVIEW 2019 and share it? As it happens I am working on communication with the Anser U2 SmartOne and I'd like to see if there's anything you found that I'm missing.
07-29-2021 04:16 PM - edited 07-29-2021 04:21 PM
Hello
I have not finished Vi yet, but it will do you some good
The parameters for the serial configuration are those of the U2proS, I don't know what they will be for your team.
There are some access "codes" for the ProS, do you have the ones for the SmartOne?
My email ricardo@neutroingenieria.com
Greetings.
07-30-2021 09:58 AM
@Orozco_1 wrote:
Hello
I have not finished Vi yet, but it will do you some good
The parameters for the serial configuration are those of the U2proS, I don't know what they will be for your team.
There are some access "codes" for the ProS, do you have the ones for the SmartOne?
My email ricardo@neutroingenieria.com
Greetings.
I have the U2 Net Protocol document which shows the format of the data packets that need to be sent.