LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

counter

Hi,

 

I'm not a computer ingineer, so my knowledge is basic.

I 'm trying to read the value of a counter on Labview (7.1), via a serial port.

Here is the Visa config. of the counter:

- Baud rate: 4800

- Parity : even

- Stop bits: 1

 

I need to send  first a message (Visa Write), then It'll answer me (Visa read). Is it the right procedure?

 

I receive an error "1073807253", which mean that the "visa serial" isn't well connected But I've checked evrything and it seem rigth.

 

Please help me out.

0 Kudos
Message 1 of 19
(3,229 Views)

You may not be giving the counter time enough to respond. Place a 100-200 ms wait function after you write the command to the instrument.

PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 2 of 19
(3,199 Views)

Hi Pierre,

 

you should at first clean up your VI:

check.png

- After doing so you should check the display type of all string constants and indicators. As I switched on "display mode" for those string constants I noticed they are not the same…

- Then you have configured SerialPortInit to use LF as TermChar. Does your device support such TermChar? If yes: use it by requesting slightly more bytes for VISARead then the device will likely send in it's answer to your request.

- Please check the device's manual for any required TermChars in the message as you have to append them on your own! In case the device is waiting for some special TermChar you will may not receive any answers…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 19
(3,188 Views)

Error -1073807253 is a framing error.  I wonder if the problem is the first item in you Concatenate Strings.  The first item shows as 02 but you are using Hex Display for that constant so you're seeing the ASCII value in hex, which is an unprintable character.  The other 3 items are Normal Display so you are seeing the actual text that will be sent.  Perhaps you need to change the first item's display type to Normal and then type in 02.  Try that and see if it helps.

 

Kelly Bersch
Certified LabVIEW Developer
Kudos are always welcome
0 Kudos
Message 4 of 19
(3,169 Views)

I'v tried to include  a timer 200, 500 & 10000 ms. bt it doesn't change anything

0 Kudos
Message 5 of 19
(3,144 Views)

Hi pierre,

 

and what about all those other suggestions/comments?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 19
(3,142 Views)