Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How differ? Working serial vi and not working serial vi

Finally I found a well-working vi file in the internet. Even though it is too long

time ago, I'm not sure the original writer would still be a LabVIEW user now.

But I'd like to say thank him (his ID was roiht).

 

The attached file is done by roiht and working well. But I don't know why the

basic serial read and write vi is not working but the attached file working.

There is no framing error message in this vi. Can anyone give me the answer?

0 Kudos
Message 1 of 5
(4,074 Views)

I see a few differences beyond the differences due to 6 major updates of LV.

 

Serial General disables termination characters while Simple Serial has it enabled. General only writes one time for each press of the Go button while Simple has no looping. If Simple is called repeatedly in a loop, the frequent configure-write-read-close sequence is likely to produce framing errors. This is because of the time it takes for the port to configure. There is no delay between configure and write. General never closes the port.

 

Lynn

0 Kudos
Message 2 of 5
(4,061 Views)

Thank you for your fast and kind answer.

However, The default program described as Simple Vi in my posting doesn't work even when it is executed just one time.

If the sympton is like this, can I think that there is another problem in my situation?

0 Kudos
Message 3 of 5
(4,059 Views)

Hi

even the first time it can be handy to wait for init before sending.

greetings from the Netherlands
0 Kudos
Message 4 of 5
(4,051 Views)

Serial communications often involve a bit of magic or luck. Many vendors do not completely specify their communications protocols or they create protocols which are so different from the most common ones that it is difficult to determine what needs to happen.

 

Since you have a program which will communicate, you need to dig through it to document exactly what it actually does. Every setting.  Especially default settings.  Every delay. Every byte transmitted or received. Do not assume anything - verify. Then you should be able to set up the modern program to work the same way.

 

Lynn

0 Kudos
Message 5 of 5
(4,041 Views)