LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

shifting due to adding junk bytes(2-4) after every 512

Hi,

i am facing an issue while logging data to measurement file/tdms.

 

i am sending a pattern of data from  fpga hardware(fpga-ft232h-labview). i am getting same pattern but its is shifting. 

as after every frame(512bytes) labview adding 2-4 bytes. 

 

please suggest how to avoid this case/issue. 

 

please see the snapshot attached. suggest me where i have to make correction.

Download All
0 Kudos
Message 1 of 6
(2,151 Views)

Hi saikiran,

 

please see the snapshot attached. suggest me where i have to make correction.

As you only show some images we cannot suggest how to prevent that problem.

It seems the "unwanted" data is already in the string you get from VISARead: check the data at the data source!

 

i am sending a pattern of data from fpga hardware(fpga-ft232h-labview).

Maybe the problem is here: are you sure your "fpga hardware" is really sending just the data you expect?

Best regards,
GerdW


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

yes.

 

fpga part i have verified using logic analyzer. its sending correct data only.

 

<<It seems the "unwanted" data is already in the string you get from VISARead: check the data at the data source!>>

 

data in string !?! as my last bytes are 0's but its giving highest value "118" of my pattern data after every 512.

 

can we refresh string after every 512 ? so i can get only sent data.

 

is there any alternative ? 

 

 

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

Hi saikiran,

 

data in string !?!

Yes, in the string you get from VISARead:

check.png

 

as my last bytes are 0's but its giving highest value "118" of my pattern data after every 512.

Do you get any errors or warnings from VISARead? That would explain why you get "0's" as last bytes…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(2,125 Views)

please see pattern .. according to that i will get "0" as my last byte not 118.

 

 

can we refresh/reset string ? .

 

 iam not getting any errors nor warnings.

Download All
0 Kudos
Message 5 of 6
(2,120 Views)

Hi saikiran,

 

please see pattern .. according to that i will get "0" as my last byte not 118.

To plot this "0" in your chart it has to be part of the string data you receive from VISARead. The chart does not "magically" add zeros to your plots: they come from your data source!

So you need to examine where that zero is coming from - this process is called "debugging"…

 

Again: which data do you receive? Does that string already contain those zeros? Did you even try to debug your VI?

 

can we refresh/reset string ? .

The string is refreshed with every VISARead call - THINK DATAFLOW!

 

iam not getting any errors nor warnings.

I didn't ask for the error list of your VI in edit mode.

I asked for the errors in the error wire coming out of VISARead: you need to implement some error handling in your code to even recognize errors/warnings from VISARead! (This also is part of good coding style and debugging!)

Best regards,
GerdW


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