I have just started using an ADC-20 data logger to record clean room air pressures in our hospital radiopharmacy. The Logger works fine but I want to record the measurements in to an Access 2003 database. I have written the code to receive the data using DDE but find that all I can see is the recordings from the first channel. I am recording measurements on two differential channels - how do I see the measurements from channel 3 & 4?
I have sorted the problem, did'nt realise that all values were output with carriage returns between channels, just a little programming to select the readings and it works fine.
Any chance you can assist with the code for Access - I've got excel working but would much prefer to record all sample results in a database (in order to create charts based on time periods selected by the user).
Here is the code I have written for a form which logs two pressure readings from a transducer. I have set the timer event to record the readings every 10seconds and then after 150 readings the average is calculated and written into the database.
The first code is the open event and sets up the CHAN parameters.
The second code is for the timer event.
I had problems accessing the second set of readings until I realised that they were all output as a single string and so had to use 'mid' and 'len' statements to separate them out.
Hope this helps you.
Laurence Scott
Code:-
Private Sub Form_Open(Cancel As Integer)
CHAN = DDEInitiate("PLW", "Current")
End Sub
Sorry to bother you again - finally had a stab at the code in Access and for some reason "The DDE conversation was interrupted" error keeps appearing. Doesn't even get past initial ReturnData1 line for the 'chan name'.
Any clues - is it something to do with the VBA refrences?