LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i use a wait function with a termination char xD

Solved!
Go to solution

Hello,

 

I have tried as you have said.


you must be getting sets of numbers appended together without your linefeed character.

 


i think it was the problem. And also some times my counts are missing(getting much lower count than the exact count). How can i solve this issue.

Is there any way i can skip those unwanted counts.

 

Thankyou

 

Download All
0 Kudos
Message 11 of 14
(1,059 Views)

It seems you are definitely missing some numbers there.  Some carriage returns and the number 1 at the beginning of the next number.

 

It is a little hard to confirm because you complicated the array generation.  The string array is manipulated and based on data from the case structure.

 

Put the array on the while loop so it shows the data coming directly from the VISA read like show below.  Make is \code display so we can see the termination character.

 

Now we'll know exactly what you are getting without any other string manipulation code interfering.

 

0 Kudos
Message 12 of 14
(1,047 Views)

Hello,

 


Put the array on the while loop so it shows the data coming directly from the VISA read like show below.


If i try to do like this. I am not getting any data in the array string. It shows like this 0\r (pic 1). I then tried the way i did before with '\ codes' display(pic 2). But i didnt found any difference. Still the count is decreasing or appending two values with missing one number.  

 

If i try to count the time in seconds using timer in Psoc4 (displaying a seconds counts ) then it working properly with out any counts missing or appending two couts. I think there is a problem with the speed . If i try to display the counts with much speed or high count value then the problem is occuring. If i try to display a seconds count (increasing of a single number every time ) it works fine.

 

Download All
0 Kudos
Message 13 of 14
(997 Views)

I have no idea what you mean by Psoc4,  or "displaying a seconds counts".

 

But if your counts3.png is showing nothing but 0\r, that is exactly what you are getting from your device.

 

If with counts4.png you are getting somewhat value numbers sometimes, that means somewhere in your string array, you are seeing those numbers as well and not just 0\r.  (there may be more data in the string array because it grabs every data packet that comes through while you numeric array is only grabbing an element every second.

 

The problem is either in your device, or in the cables between the device and your PC.

 

You could try using something like Hyperterminal to display the data on screen as it comes in.  Although Microsoft discontinued Hyperterminal in recent Windows versions.  You may have to find a 3rd party terminal software.

 

 

 

 

0 Kudos
Message 14 of 14
(990 Views)