Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in reading data through serial port

Hii all

 

1. I have developed a code that will transmit data to Zigbee connected thru RS232 & then this will wirelessly pass on the data to another zigbee module located at the other side...

2. For checking data integrity (to check whether data loss occurs or not) I pass on some values (These values are while loop iteration counts) at the rate of every 1ms

3.  Write to serial port works fine and at the same time whatever data is being transmitted I am logging it....

 

Now my problem is that - at the same time when whatever data is being written to COM port I want to read & log  the same data from other zigbee....that means- say if I send (write) values from 0 to 50 I should be able to read back those values

 

for that purpose I will need VISA Read but whenever I put VISA read on my block diagram & wire it throgh VISA events following problems occur-

 

1. whatever timeout I specify for VISA wait on event that gets added to Millisecond multiple timer constant and thus my values which were previously getting well passed at 1 ms rate ;  now pass at "event timeout + ms constant value"...and I see delayed values coming on Hyperterminal  at the other side

 

2.  there remains no time for my vi for read operation - as my execution terminates after while loop reaches a specified count --for instance if I set count as 50 ...after writing 50 values to COM port my execution aborts & hence data can't be read & I get Timeout Expired error 

 

I m posting screenshot of block diagram code for reference.

 

Kind request to help me asap as I m stuck here for a long while

 

Best Regards

Snehal

 

 

 

0 Kudos
Message 1 of 1
(3,205 Views)