Instrument Control (GPIB, Serial, VISA, IVI)

取消
显示结果 
搜索替代 
您的意思是: 

VISA

已解决!
转到解答

The data have different values at the same time.

Can anybody help me out?

I want to store data as a set of data points with corresponding timestamps.

mb030216_1-1683224217538.png

 

 

0 项奖励
1 条消息(共 25 条)
2,623 次查看

As far as I can see, you are not logging the measurement time yourself and I think it is also not coming from the instrument.

If you measure the system time with tickcount  and use each timestamp to report to the table you get a timestamp.

Only thing you need to do is to keep the first timestamp in a shift register and subtract it from all timestamps before stopping the loop, or just after the loop.

 

The your time series start at zero.

If you need help for this, just ask and I will program a small example.

greetings from the Netherlands
0 项奖励
2 条消息(共 25 条)
2,607 次查看

I don't get it. Can you give an example?

Thank you so much.

0 项奖励
3 条消息(共 25 条)
2,580 次查看

Hi

Maybe you can remove the date time in the beginning.

I added a time at the end.

 

Have a nice time

greetings from the Netherlands
0 项奖励
4 条消息(共 25 条)
2,546 次查看

I typed the wrong requirement.What I need is a data corresponding to different time.

0 项奖励
5 条消息(共 25 条)
2,531 次查看

How fast are you measuring. This should have a resolution of milliseconds.

I replaced time in seconds by tick count in ms.

greetings from the Netherlands
0 项奖励
6 条消息(共 25 条)
2,526 次查看

After the test, the following situation still occurs.

Where am I using it wrong?

 

mb030216_0-1683375715697.png

 

0 项奖励
7 条消息(共 25 条)
2,523 次查看

Hi

You are measuring so fast that ms resolution does not work.

I also tried to be sure that the first measured time was zero but I think that opening the file the first time takes a lot of time, relative to measuring.

So do only aggregate measurements in the loop and wait at least 1 ms. 

Save the data to a file after the loop and make sure not to have to much data so e.g. stop at 1000 iterations.

greetings from the Netherlands
0 项奖励
8 条消息(共 25 条)
2,519 次查看

OK.I really appreciate your help in resolving the problem.

0 项奖励
9 条消息(共 25 条)
2,505 次查看

Hi

Can you send me one of the strings you are reading with VISA.

Just to look at your string to value conversion.

Or even better is there a manual I can read?

 

How much time do you want to measure. We can also limit the reading to once per ms if that is sufficient.

greetings from the Netherlands
0 项奖励
10 条消息(共 25 条)
2,496 次查看