Add/Delete Graph Traces


Recommended Posts

I have 32 channels one of which is named Rain_Lancaster. I have a graph component, on a page, named RainLevelGraph. I have attached the sequence to test the add/delete trace, TempSequence, . Why am I getting error C1000? Is this sufficient information? I am a nubie at DAQFactory. My ultimate goal is to allow the customer to turn and off 32 channels via buttons on the page with the graph.


Link to comment
Share on other sites

You have a couple problems:

1) in the first real line you forgot the + to concat the strings:

? "Traceflags...." + TraceFlags

2) When calling the Add/DeleteTrace() functions, you need to pass a string. LancasterTrace without quotes around it is a symbol and DF is going to look for a variable, channel or some other object with that name. You need to enclose it in quotes.

Finally, I recommend using an array of bits instead of trying to do bit functions on a single byte. If this was an embedded system with 32K it'd be one thing, but then you wouldn't be running DF either. Also, FYI, there are three functions that make bit operations easier: testbit(), setbit() and clearbit(). A lot easier to read too than the bit math (though I'm glad to see you know how to do it that way!)

Link to comment
Share on other sites


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