Settint Alarms


chippa

Recommended Posts

hello,

i am not very knowledgeable with computer coding and i was wondering if i could get your assistance??? i am using DAQ Factory on an engine dyno system and i have converted all the signals to their appropriate readings however im having trouble setting up the alarms for it. i need to set an alarm that begins recording all the data once the RPM level reaches 1000 revs and then stop once it falls below that level again, but i dont know how to input it into the program, and i was wondering if i you could get some assistance?

thanks for your help

cheers

David Chipperfield

Link to comment
Share on other sites

Well, technically, that's not so really an alarm, but conditional logging. I mention it only because there is something else in DAQFactory called alarms, which technically could be used for this, but is overkill.

I'm going to assume you have a channel called RPM and a logging set called MyLoggingSet.

1) Click on the RPM channel in the workspace (under CHANNELS:), then click on the event tab.

2) In the event tab put the following script:

if ((RPM[0] > 1000) && (RPM[1] < 1000))
   beginlogging(MyLoggingSet)
endif
if ((RPM[0] < 1000) && (RPM[1] > 1000))
   endlogging(MyLoggingSet)
endif

You could also write it this way:

if (RPM[0] > 1000)
   beginlogging(MyLoggingSet)
else
   endlogging(MyLoggingSet)
endif

I'm actually not sure which would be more efficient. Probably the second one.

Now the only problem is that logging sets are not really designed to be started and stopped a lot and have a small amount of latency. This means that you may miss the first few data points after the RPM passes 1000, or you may get a few extra after it drops below. If this is a problem, you should probably use an export set instead, with the export set setup to only log one line of data. My guess is that you are not constantly going above and below 1000 rpm so this is probably not a big problem.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.