Sending Frequency of data from TCP/IP

Post Reply
liming
Posts: 11
Joined: Wed Jun 21, 2017 8:09 am

Sending Frequency of data from TCP/IP

Post by liming »

Dear all, I wrote a C++ program to receive data from ActiView software in two seconds. I set a timer to ensure the time period of my program is precisely two seconds.The sampling rate was 2048 Hz, and TCP samples/channel was 16. So it means that the data sending frequency was 128Hz. However, the number of data were different each time. Hence, I want to ensure whether the data sending frequency is precisely 128Hz or fluctuate within a certain range.
Thanks in advance for your help,
Ming

Coen
Site Admin
Posts: 1124
Joined: Fri Mar 26, 2004 7:00 pm
Location: Amsterdam, Netherlands
Contact:

Re: Sending Frequency of data from TCP/IP

Post by Coen »

The data is buffered (in the ringbuffer and in ActiView and in the TCP/IP protocol) so the sending rate over TCP/IP fluctuates.

Collect 4096 samples in your receive program, and you have exact 2 seconds of data.

Best regards, Coen (BioSemi)

liming
Posts: 11
Joined: Wed Jun 21, 2017 8:09 am

Re: Sending Frequency of data from TCP/IP

Post by liming »

Thanks for your help. It solves my problem :D .

liming
Posts: 11
Joined: Wed Jun 21, 2017 8:09 am

Re: Sending Frequency of data from TCP/IP

Post by liming »

Coen wrote:
Mon Oct 15, 2018 1:55 pm
The data is buffered (in the ringbuffer and in ActiView and in the TCP/IP protocol) so the sending rate over TCP/IP fluctuates.

Collect 4096 samples in your receive program, and you have exact 2 seconds of data.

Best regards, Coen (BioSemi)
I have another question. When I select a sampling rate, 'TCP samples/channel' in Actiview interface 'TCP server' is generated automaticly. For example, if I set the sampling rate as 2048 Hz, the value in 'TCP samples/channel' is 16. How can I change this value?
Thanks in advance for your help.

Regards,
Ming

Coen
Site Admin
Posts: 1124
Joined: Fri Mar 26, 2004 7:00 pm
Location: Amsterdam, Netherlands
Contact:

Re: Sending Frequency of data from TCP/IP

Post by Coen »

The TCP_samples/channel is generated in ActiView and linked to the packet size that is used to read the ringbuffer and the minimum step size for scrolling the data on screen. You can change only the value by editing the (open-source) LabVIEW code of ActiView (LabVIEW programming environment required).

Best regards, Coen (BioSemi)

liming
Posts: 11
Joined: Wed Jun 21, 2017 8:09 am

Re: Sending Frequency of data from TCP/IP

Post by liming »

I open the ‘Active707-Lores’ using LabVIEW and I find the wiring terminal related to the ‘TCP samples/channel’, but I don't know how to modify the value. So do you know how to modify it?


Regards,
Ming

liming
Posts: 11
Joined: Wed Jun 21, 2017 8:09 am

Re: Sending Frequency of data from TCP/IP

Post by liming »

Coen wrote:
Mon Oct 22, 2018 11:44 am
The TCP_samples/channel is generated in ActiView and linked to the packet size that is used to read the ringbuffer and the minimum step size for scrolling the data on screen. You can change only the value by editing the (open-source) LabVIEW code of ActiView (LabVIEW programming environment required).

Best regards, Coen (BioSemi)
I find the wiring terminal of ‘TCP sample/channel’. It’s a display unit. I change it to an input unit and set a value. Then I run the ActiView and receive
the data. The data seems to be no problem, but I am not sure whether my approach is feasible.

Regards,
Ming

Coen
Site Admin
Posts: 1124
Joined: Fri Mar 26, 2004 7:00 pm
Location: Amsterdam, Netherlands
Contact:

Re: Sending Frequency of data from TCP/IP

Post by Coen »

Your approach will work, providing that the value generated by ActiView divided by the value you select manually is an integer. For example: if ActiView generates a value of 16 samples/chan, the you can manually set 1, 2, 4 or 8 samples/chan.

Best regards, Coen (BioSemi)

Post Reply