11-29-2007 03:59 AM
11-30-2007 07:02 AM
12-02-2007 05:59 AM
Hi Adnan,
Yes I am only using one counter.
Attached are the two routines I have written - int Configure_PCI6601(long CNTR_NO) is called at the start of the application and double Read_PCI6601(long CNTR_NO) from a timer thread.
The 6601 has only one DMA channel 0 (CNTR_NO = ND_COUNTER_0).
The program will work fine for a vast majority of time and then as mentioned before, intermittantly crash.
For background...The application is to control dynamometer engine speed and therefore the function double Read_PCI6601(long CNTR_NO) is repeatedly called as fast as the program can handle - the time thread interval time is set to 0. There are 60 teeth on the drive shaft, so every quarter revolution an adjustment to the pid is done.
Many thanks
12-03-2007 08:04 AM
12-03-2007 08:47 AM
Hi Adnan,
I have attached the routines which are connected to the speed reading. Essentially I have created a Timer control in the Uir with an interval of 0.000 seconds (so as fast as possible) to Read_Speed(...) which in turn calls Read_PCI6601(ND_COUNTER_0);
There is also another timer control which services reading data from FieldPoint via Ethernet and one to update the Uir.
Many thanks.
12-05-2007 04:04 AM - edited 12-05-2007 04:06 AM