Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

serial communication/Program very slow

I have written a program to control the PDA-750 via RS-232c, when I am reading the current reading continually the program take control of the Hardware. The PDA-750 stop responding to any external change i.e I am using this fore light measuring application, as the light intensity increases the current increases too.

 

To overcome this problem I have use “Wait until next mille second”. This works fine if I use 1200ms or above but this slows the operations rapidly.

 

I upload a screen shot of my Vis.

 

What can I do to make it run faster and the hardware has its control too?

Download All
0 Kudos
Message 1 of 6
(3,903 Views)

Hi,

In your VI there is no (or little) time between send data en 'bytes at port'  So your device has to respond very fast to make this work.

I suggest that you also place a wait between the write and 'bytes at port'

You can also have a look at a VI i use to try out serial communication

 

0 Kudos
Message 2 of 6
(3,888 Views)

Thanks KC for suggestion, I have placed a wait ms in between VISA write and bite at port. It is the same problem the device start responding if I chose the value of 1200ms or above.

 

I am afraid I am using lower version of LabVIEW, I could not open your VI. Is it possible to post a screen shot?

 

Thanks for your time

 

Hanman

0 Kudos
Message 3 of 6
(3,871 Views)
Hi Hanman,
 
I can convert it to 7.1 tomorrow. Is this the version you use ?
 
0 Kudos
Message 4 of 6
(3,866 Views)

Hi KC

Yes I am using LabView 7.1

thanks again

0 Kudos
Message 5 of 6
(3,861 Views)
Hi,
 
Here is the 7.2 version.
 
This VI writes the data to the com port, waits for the number of bytes received OR if the data is the same for the last 5 loops (and not zero) OR time-out.
If a time occurs the received data will present at the output.
 
I don't think it makes much difference for your problem.
 
Maybe your device has a problem if you sent command to fast. You could try to add some time after the read.
0 Kudos
Message 6 of 6
(3,845 Views)