Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

CR1000 Newbe Program Help


jllabs Mar 20, 2009 05:49 PM

I am working on my first CR1000 program and just need a little input to make sure I am using the correct approach to my application.

I will be monitoring two groups of instruments on a slow frequency. The first group is using vibrating wire technology and a few readings will be taken every two hours. The second group is an automated sequence of pneumatic readings 4 times a day or every 6 hours. It is a painfully slow process and takes 3-5 minutes per reading and about an hour total time. One other process I need to control is power management for the cellular modem. I want to turn it on twice a day for two 30 minute windows.

Below is very incomplete code outline I have been playing with in and have it working using shorter time intervals. I just want to make sure I am using the best approach and an input would be appreciated. The code outline starts with the BeginProg...

BeginProg
Scan (1,Min,0,0)
Code to monitor IfTime and turn on/off modem
NextScan

SlowSequence
DataTable (Table1, 1,-1)

EndTable

Scan(2,Hr,3,0)
For i = 1 to xxx
Code to read instrument (i)...
CallTable Table1
Next i
NextScan

SlowSequence
DataTable (Table2, 1,-1)
...
EndTable

Scan(6,Hr,0,0)
For i = 1 to xxx
Code to control pneumatics... (very slow 3-5 minutes)
Code to take reading when ready...
CallTable Table2
Next i
NextScan
EndProg


A few additional questions:

Can you have multiple scans without using the SlowSequence command? The second scan is not really a slow sequence but I could not find in the programming manual that you can have multiple scans except by using the slow sequence.

I declared the tables above as DataTable(Name,1,-1) is this the correct approach for writing the data each time the CallTable is used regardless of a table storage interval.

Thanks in advance for your input and have a wonderful day!


Dana Mar 23, 2009 07:21 PM

I think your approach should be fine.

Can you have multiple scans without using the SlowSequence command? The second scan is not really a slow sequence but I could not find in the programming manual that you can have multiple scans except by using the slow sequence.

You can have multiple scans, but the one declared first would need to have a finite number of loops or a way to exit, or you would never leave that scan. I think having two scans would rarely be used.


I declared the tables above as DataTable(Name,1,-1) is this the correct approach for writing the data each time the CallTable is used regardless of a table storage interval.

CallTable will make the datalogger execute the table code. However, a table may be called without data storage occurring. The TriggerVariable in the DataTable instruction, or DataEvent or DataInterval in a table would dictate whether data is actually stored, even though the code might be executed.

Regards,
Dana


jllabs Mar 25, 2009 01:16 PM

Dana,

Thank you for the reply. As I have been working through the software I am begining to understand the logic behind it.

Log in or register to post/reply in the forum.