11-22-2011 11:37 AM
@Dennis
The total number of samples is set-up before hand ...for instance if I have 1000 mV to scan at 100 mV/s from 0 V to 1000 mV it will take 10 s to complete the scan. The total number of data points depends on the resolution of the instrument. If the instrument is able to acquire a data point for every mV then 1000 data points will be acquired in 10s. e.t.c
will post my terrible looking code tomorrow.
regards
B
11-23-2011 02:16 AM
Dear All
Please find attcahed my terrible code .....it works fine ...except for the timing problem tha I am having.
The timing of the loop depends on how fast I enter data into each sequential frame.
Regards
B
11-23-2011 03:34 AM
barrys wrote:Please find attcahed my terrible code .....it works fine ...except for the timing problem tha I am having.
You have a weird definition of "fine". I don't have your device and your subVIs are missing so I cannot really troubleshoot, still....
Do you have a list of the instrument commands?
11-23-2011 03:55 AM
Dear altenbach
1. The 'ms timer' was there for no reason ...I just wanted to see what the ms value was.
2. The dt value changes depending on scan rate - the loop writes x and y values at each loop , as well as plots the x,y value on the graph.
3. You are right about the strict order ...but in this case it doesn't really matter - this is not important and although 'not elegant' is not he poblem here imho.
4. The down to plot toggle alows you to plot one point each loop and keep the previous points on the grph at the same time . If the toggle was up , it would as you suggest, plot one point and clear each time.
5. I have x,y,z values coming off the instrument seperated by a comma, i just chopped the values up and then recombined the values required y,z for instance to plo to graph and into file. Again not elegant but works.
6 **** This could be what the problem is ........could you further elaborate what you mean with regards polling loop ??
7. I am new to Labview and don't really understand error handling very well. There is not much that could go wrong really ...just giving the instrument a series of commands and collcting data.
Regards
B
11-23-2011 09:44 AM
Dear All
The source of my problem , as I have just found out is that the timed loop is out . This causes my GPIB card to time-out...if I set the timed loop timing to correspond to my 'scan rate' , I can adjust the period of the loop and the time for complete iteration in order to keep the "expected time - actual time" down to below the value that my card times out at.
A different way of answering my question would be given a single input (i.e: scan rate) , how would one go about dynamically adjusting the difference between two numbers (expected-actual) to keep the difference within a certain range ??
Regards
B
12-01-2011 09:33 AM
Hi,
the code looks much better if you press Control-U 🙂
Anyway, I still don't think I get your problem. Could you describe in more detail what do you want to do now?
Ad 6.
If you don't put a "Wait" or "Wait until next ms multiple" function, the loops will run as fast as possible.
Best regards,