Jump to content

Sai Mouli

Members
  • Posts

    6
  • Joined

  • Last visited

Sai Mouli's Achievements

Newbie

Newbie (1/4)

0

Reputation

  1. Hello everyone, While logging the sample data from various channels in an MCC118 , I was wondering if the number of channels also affect the time interval between samples ? Say for example, I had activated only channel 0 and channel 1 for a scan rate of 100 samples per second. Would the result be like, Time interval between samples = 1000/100Hz = 10ms Time interval between Channels = 1/(sample_rate * No_of_channels) = 1000/(100Hz*2) = 5 ms Hence forth while assigning time stamp to samples the end result give rise to, Sample No Channel 0 Channel 1 1 0 5ms 2 10ms 15ms 3 20ms 25ms 4 30ms 35ms and so on ................ Would the above be the real case?. In the hardware overview, it was given that for an internal scan clock with a conversion time of 8 micro seconds the time interval between successive channel could be neglected. Could someone please clarify this doubt for me and let me know if there is a flaw in my understanding. Thank You, Yours Sincerely, Sai Mouli Manohar Rao
  2. Thank You for the clarification. I am using Raspberry Pi 4 computer model B with 2 GB ram. Also how do I select a specific number of channels? Like say I only want to run measurement on Channel 0-2 while deactivating all other channels? a_in_scan_read() function doesn't seem have any input parameters referring to channel numbers. a_in_read() does but it only does a single read returning just a single value from scan buffer. None of the option flags consist of any scan options that allows us to select our desired channels. Do I just have to store data the from my desired channels? or is there any existing method or any specific detail which I overlooked? kindly please let me know regards, Sai Mouli
  3. Hello Sir, Thank you for the response. It clears many things for me. Just to make sure I have understood correctly and get some more insight. -->Say for example I insert a_in_scan_read() function and run it at a scan rate of 1000 samples/sec inside a while loop. I will apply time.time() function to record the starting time of the scan and as soon as the very first sample is read I can simply increment the time stamp for every successive sample with an interval of 1ms. More clearly, Channel 0: Sample 1 --> 33ms(Since start of scan) Sample 2 --> 34ms Sample 3 --> 35ms ..... -->It is my understanding, but as given in the Hardware specifications, the Scan Clock description says the internal clock has a capacity of upto 100KS/s and a conversion of 8micro seconds per channel, does it imply by default MCC118 scans samples at equal time intervals for upto 100KHz frequency? -->And as per high sample rates , I have one more doubt, for every interation in a loop, after reading the scanned data in the same loop I am storing data in arrays as well as plotting data in an animated canvas figure for visual display of the user. The whole program is capsuled with in a GUI window.Do they cause interference to the progrm as well? Do I have to remove them as well to store accurate data in a sheet? My apologies for any errors in details. Looking forward to your response. Thank You, Yours Sincerely, Sai Mouli
  4. Hello everyone, Good Day, I am facing a huge problem in my project where I am bulding a GUI interface using MCC 118 voltage measurement instrument. My objective is to log everysingle data point measured from each voltage channel and store this data and export it in an excel file. The most cruicial task here is to achieve equal time intervals between consecutive sample points read. Say for example, sample 1 is read at 33ms, sample 2 is read at 33.2ms sample 3 is read at 33.4 ms. For this to be possible I don't know if the MCC 118 provides samples with equal interval. As we may know by using a_in_scan_read() function doesnt deliver samples one at a time but a set of samples for each iteration. Say for example, if i keep a_in_scan_read() function in a loop i read with a scan rate of 1000samples/sec for 10 second expecting 10,000 samples in total per channel. The working mechanism is such that in the first iteration 30 samples/channel are read then in second iteration 55 samples , in 3rd iteration 40samples and so on till the limit of 10,000 samples are achieved.My approach was that eventhough a set of samples are read for each iteration, calculating the time difference between begin and end of each iteration in a loop and dividing it with the number of samples read for that iteration would form an equal time gap between each sample point. However, this method only works to some extent. It goes this way, say for IT(Iteration) 1 -- 30 samples --- time interval --- 1.5 ms IT 2 ----------- 40 samples ---- time interval -- 1.7 ms IT 3 ------------- 56 samples --- time interval -- 1.85 ms ......... As you can see for each batch size the time interval is varying. I could take the time difference between the beginning and end of the entire Loop instead of just recording the time taken for each iteration in a loop. However, I am not sure if I could do that since in between , I am also storing and concatenating the data received from the channels at the end of each iteration before moving on to the next iteration in the Loop. I believe some computational time is also lost in this part of the process .Previously followed by storing data I also used to Log real time data in a canvas figures for real time plotting . However as the results have shown non uniform time interval between sample points I decided to disect that part from the process. Now I am just reading and storing data however the results are still the same. Could someone give me the best possible solution to achieve equal time interval between sample points? This feature is quite crucial in signal processing applications. What needs to be known is, Is there any way to accurately log the time for each sample read from MCC118 ? or is there any computational method feasible enough to manually develop the time interval between samples as accurately as possible? I have attached the Loop function which I am using in my program please open it in notepad. some key notes: ->stime- refers to time the scan begins ->click_stop - just stops the process ->all other variables related to data are data storage parameters ->D0-D7 are global variable conditions for respective channels to be enabled by user(0->selected and 1->not selected) I would really like to know if I am making any mistake here. I hope I was clear enough and Please let me know. Thank You, LOOP
  5. Hello Everyone, Happy New Year to Everybody I am building a gui application in python inorder to conduct a real time plot for each channel of the Mcc118 Daqhat measurement instrument. However, I am facing a serious issue right now. I am applying the continuous scan function a_in_scan_read() which reads batches of the scan buffer for each iteration at a scan rate of 1000. Say for example, in a while loop or a recursive function loop for the first iteration it read 32 samples and in the second it reads 70 and so on. So what I tried was to plot the 32 samples first but there is the after() function of Python GUI cant go beyond 1ms and by the time it finishes when the next batch arrives it reads more than 1000 samples. So then I tried to split things up by scanning in a different function then storing the data in seperate function and execute the plot with a different function triggered manually with the click of a button. However, here the plotting only works when the scanning is complete so if the sample size of request is 100000 i have to wait for 100seconds till the plotting begins. Is there a better way to do a real time plotting say for now just a single channel. There only few ways I can think of . Read just one samples at a time and plot it instantly but I dont know the function to read 1 samples every one milli second / plot the batch fast enough to move on to the next batch / is there a way to perform multi processing or multi threading. Any suggestion would be really helpful. Thank You
  6. Hello Everyone, I am using Mcc118 with Raspberry-Pi in order to measure the voltages of 8-channels. Currently, I am running one of the examples programs named as continuous reading which scans and displays the voltage samples for each channel at a given scan rate. However, the program only displays one value for a certain scan count. Take for example if I adjust the scan rate to 1Ks/S,I would be gaining only 1 sample for every 100-120 samples read. Or you could say that for a scan rate of 1000samples per sec you'd expect 1000 voltage readings to be displayed in 1 sec but I am only receiving 3 samples in for each second while it reads a 1000 samples. Is there any way to obtain all 1000 samples read in 1 second?. Please let me know. Thank You
×
×
  • Create New...