Instrument Control (GPIB, Serial, VISA, IVI)

cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

Problem with Serial Communication

            I am trying to write "\x59c\x3aimagesnap" to a scanner using the VISA serial read and write vi and I'm having problems reading the image from the scanner. When i type the same command in a terminal. I get the Image Data, the command read back to me in ASCII as well as any barcode scanned. When I use the VISA serial write and read vi., I receive just the information scanned from a barcode.

            I'm using one of the Example serial vi's as a test. the "Continous serial read and write.vi" under help  / find examples and type serial. Could I get help in how to create  a terminal-like output  within LabVIEW through a serial connected scanner?

Please and Thanks

0 kudos
Mensaje 1 de 13
6.467 Vistas

Without seeing the VI, it seems like there is more data in the buffer. You are probably reading it once and the VISA Read.vi is reading up to the first termination character or all of the bytes you are asking it to read.

 

Try putting your read in a loop until Bytes at Port equal 0.

0 kudos
Mensaje 2 de 13
6.465 Vistas

I attempted that and didn't get any far. I've decided to try to communicate it through .NET assemblys but I'm having a problem loading an example assembly and running it. I keep getting an error .
https://decibel.ni.com/content/docs/DOC-5921

 

theyre both in the same directory and I also tried to put them under the same project file.

I'm running an evaluation LabVIEW program if that helps at all

 

0 kudos
Mensaje 3 de 13
6.427 Vistas
You haven't provided the assembly that you are calling or the error code/message that you get. Like your first post, you haven't provided enough information to help.
0 kudos
Mensaje 4 de 13
6.419 Vistas

Sorry, the assembly( vi and dll) is provided through the link. I just loaded the vi and dll in the same directory and ran it through labview. initially I received this error:
error1.PNG
 Later, I double clicked on the construction node and input the TI83.dll into the assembly and received this error:
error.PNG
I'm an evaluation version of LAbVIEW 2014 if that helps.

0 kudos
Mensaje 5 de 13
6.411 Vistas

do you have the .NET framework installed?

0 kudos
Mensaje 6 de 13
6.405 Vistas
Why would you call a calculator assembly if you need serial port communication? The VISA functions are really all that you need. They provide for a terminal application if you use them correctly.
0 kudos
Mensaje 7 de 13
6.400 Vistas

I'm using a dll to get an image, serially, from a scanner. it works as a dll and im just using that post as an example of accessing .net assemblys. I'm attempted to try to read and write serially through VISA but it does not send me anything except what the barcode information that the scanner scans. If I talk to the scanner on a terminal, it sends me everything, including the barcode information.

0 kudos
Mensaje 8 de 13
6.397 Vistas

Yeah, It says i have Microsoft .NET Framework 4.6 installed

0 kudos
Mensaje 9 de 13
6.392 Vistas
You are not reading enough with VISA as already mentioned. For multiple line messages, you need multiple VISA Reads when you have the termination character enabled. You have to do a little coding and not blindly rely on the example to do everything for you. It was already mentioned to keep reading until the number of bytes is zero. If you know how many lines are being sent, a read inside a for loop could also be used.
0 kudos
Mensaje 10 de 13
6.386 Vistas