How to get rid of red cross-out?


Recommended Posts

If it is actually a variable, and not text, it needs a history to "hold" the data in the variable say if you restart the .ctl file or it somehow gets restarted.

This is one of my reasons for V.Chans.

I know regular variables can save history points, just seemed easier at the time to do it with V.Chans. (You can set the history length easier and you can see your variables all at once easier.)

Hope this helps.

Link to comment
Share on other sites

Thanks. I don't want to just enter text but it should be a field where one can enter, for example, a desired frequency of a PWM and also the duty cycle of the PWM in another field.

Maybe I can use an edit box and use a channel to get the data entry over. Those boxes look more professional. I doesn't leave such a great impression with other people when you fire up a new screen and some parts are crossed out ;-)

By the way, a suggestion: It would be nice to be able to "ping" a connected device so you know the physical connection via USB or Ethernet works. Right now DAQFactory just sits there and flashes the task bar, but doesn't tell me why. Time to whip out the scope and probe around.

Regards,

Joerg

Link to comment
Share on other sites

If these are variables, then you should initialize the variables in a sequence marked Auto-start. Yes, having X's display everywhere is probably not too good, but we have to have a way to indicate that data isn't available. DAQFactory doesn't make assumptions. You need to tell it explicitly. You can get away with assumptions in other types of applications (like Word), but with data acquisition, a bad assumption can result in a bad decision which can cause serious problems.

I recommend against edit boxes on main pages. Please read the blog for why: http://www.azeotech.com/board/index.php?showtopic=3233. Instead, use the Set To action on the variable value control. This will cause a popup to appear requesting the new value. Use a separate button if you'd prefer.

DAQFactory does tell you why it can't connect, or at least as much as it knows. It appears in the Command/Alert window. You can capture these alerts and do things with it using the OnAlert sequence event.

Link to comment
Share on other sites

Oh, also, if you want to hold a setting, the easiest way is using a registry variable. If you have a lot (say > 100) settings, you probably should use a text file. The file. functions make this pretty easy. Especially the read/writedelim() functions.

V channels are largely deprecated as variables have replaced them. They only persist if you save your document so aren't the best for Runtime.

Also, you don't need a history to get rid of the X, just a valid value. It can be a scalar. You do need a history if you want to graph a value. Variables, in all versions but Express, have an AddValue() function just like channels that make it easy to create a history in a variable.

Link to comment
Share on other sites

They are initialized in Auto-Start as:

global PWMWidth = 50

global NumPulses = 100

But that doesn't seem to stick, remains red-crossed.

Now I am also getting a message when it starts up the LabJack (or wants to):

"ID must be a scaler value, not an array or string: StartStream Line 3: Uncaught error in sequence StartStream".

This is actually from your example files and the ID is declared global and set to zero. No idea what's going on there, the error message isn't too explanatory.

I do understand you reasoning behind not using edit boxes. However, they look more professional than some crossed out "text" which can give people the feel that this function is currently not available. Maybe one can have a routine in there that alerts people to hit "enter". Or place another box next to it that says something like "currently set temperature"

Regards,

Joerg

Link to comment
Share on other sites

Yes, the SetTo action helped me remove all my edit boxes, except for a small few....

Also, an Auto Start sequence with the variables = 0 also helped rid the "red x's" for a while, but soon realized after restarting the .ctl, my variables would revert back to 0.

I guess that would be ok, if your variables shoud be 0 upon restart.

About the V.Chan persist, I made a System.SaveDocument() loop for every 30 mins. :)

I should look into the file. functions.

Link to comment
Share on other sites

In order of the posts :

Are you sure the sequence with the globals is marked auto-start? Try running the sequence manually and seeing if it clears the X's. Maybe there is a typo in the variable names.

LabJack error: for this I'd probably need to see your .ctl document. Please post it. It sounds like you have changed something from the samples.

The red X's are not supposed to stay there and yes should not appear in a professional doc. However, using edit boxes is not the correct solution to eliminate them as it doesn't fix the overall problem, namely that the variable you think you are using isn't initialized properly. You can use a button next to the variable value display to trigger the Set To action if you want to make it more obvious. However, as I talk about in that blog post, edit boxes on primary screens are a BAD idea. I know other apps, especially web browsers use it, but web browsers are not SCADA applications, and what works for many user apps does not apply to a properly designed, professional HMI / SCADA app.

You can use registry variables to initialize your variables to whatever it was set before (persisting the variables). You can also, of course, initialize your variables to something other than 0, some other default value.

Doing system.savedocument() continuously is somewhat dangerous. We used to have the Auto-Persist timer which does exactly this, but the problem is that if you have a power outage in the middle of the save, your entire document is corrupted and your are out of luck. By storing settings separate to the document, the worse that happens is you revert to defaults. Also, the docs tend to grow in size if you aren't careful about your history lengths on V channels. Most people leave it at the default of 3600 when they really only need the most recent value.

Link to comment
Share on other sites

Yes, it's auto-start and running it by hand doesn't make the red x-es go away. But now I am getting stuck much earlier. It doesn't even want to go past the ID value.

Besides cosmetic changes to try things out, and the new path for the include file I didn't change the code.

Regards,

Joerg

Link to comment
Share on other sites

Your doc worked perfectly for me (under 5.83), though I got this error the first time around:

F0003 All or part of the path is invalid.: StartUp Line 3 - Uncaught error in sequence StartUp

08/31/09 21:52:28.978

So, I just adjusted the path of the include() and reran startup.

The fact that your X's still show up tells me that StartUp did not completely run. Maybe you are getting the same error and just missing it. That would be my guess since it appears ID is not being declared either, which explains your "ID must be a scaler value, not an array or string: StartStream Line 3: Uncaught error in sequence StartStream" error.

So double check your path, and watch the command/alert window.

Link to comment
Share on other sites

Checked the path and all that. Can't find an error in my file. And ID is declared.

If it's any help, I am using 5.73. Just did the upgrade but that still left it at version 5.73, at least in the "About" tab. Meaning it will not load some of the example files, saying that the file is either corrupt or for a newer version. But with my file and the timer example files (which also produce the same errors) it loads them.

Regards,

Joerg

Link to comment
Share on other sites

The plot thickens :) After the attempt of updating the version a new bug showed up: "Unable to load device driver LabJackN.dll, check file path and ..."

Well, that dll is right in the same directory as DAQFactory. What could be wrong?

Regards,

Joerg

Link to comment
Share on other sites

It can't load labjackn.dll because the newer labjackn.dll in the update is built off the newer labjackUD.dll. If you upgrade DAQFactory, you have to make sure and update the LabJack drivers as well. So:

1) Delete the following two files then install the latest DAQFactory: daqfactory.exe (or daqfactoryexpress.exe), labjackn.dll. This will ensure its updating.

2) Update your LabJack drivers and firmware

Link to comment
Share on other sites

Believe it or not, that made it even worse. Here's what happened: First it never let me delete daqfactoryexpress.exe, access denied. After some snooping around I found that despite closing the program it was still running, somehow, so CTRL-ALT-DEL was needed to kill it. Now I did what you suggested and the result is: It's all dead now. The installer ran through but did not make a new daqfactoryexpress.exe. It's gone :)

The clients whom I normally try to convince to use such SCADA/HIM software (and who would then buy from you guys) usually have mostly mechanical engineers. They become very frustrated by things like this and hang it up. So far they usually said that HMI software is too cumbersome, and they do everything with Excel and VBA. I think all this file handling upon upgrades should be done by the installer software.

So, what do I do now? Find the install CD from years ago and start from scratch?

Regards,

Joerg

Link to comment
Share on other sites

Actually all the file handling IS done by the installer. I just had you delete those files to ensure Windows hadn't applied some sort of access rights, or in your case, that you had a copy of DAQFactory that didn't quit completely. I suppose I should have just had you reboot and rerun the installer.

As for the LabJack drivers, we don't distribute the drivers from hardware manufacturers. It would be a mistake to do so.

Did you run the DAQFactory Express updater, or did you download the trial of DAQFactory? The Express updater is available (and only available) from www.daqexpress.com.

I think at this point it would be best if you contacted us directly unless you accidently installed DAQFactory instead of Express. Please email us through the web form: http://www.azeotech.com/contactus.php and provide a phone number so we can call you.

Link to comment
Share on other sites

Tried it again from the site you mentioned. Found the old *.exe file in the recycle bin and copied it back, that made at least the updater work. But the same result:

"Unable to load driver LabjackN.dll ..." (copying such error messages to the clipboard doesn't work either, BTW).

This dll is in there however, and the date of Jul-29, 2009 indicates the updater seems to have updated that because I hadn't touched the software since that time. But the program balks anyhow. Interestingly, your software actually says in the error message to get a new driver from the site www.labjack.com.

Anyhow, this installation is seriously broken and I'll fill in the contact form as you suggested. I have to get to the ground of this because I can't recommend software to clients that doesn't at least work in my own lab. But I'll have to do that next week because I have to complete two projects by Friday.

Regards,

Joerg

Link to comment
Share on other sites

Sorry for the troubles. It is unclear what exactly got messed up. So:

1) you can copy to the clipboard if you select and then right click and select Copy. The keyboard shortcut (Ctrl-C) does not copy, as probably you saw.

2) if Labjackn.dll is in your DAQFactory directory, and you start DF by running the application instead of clicking on a .ctl document, and you haven't installed DF in multiple directories, then the issue is the drivers from LabJack which are a dependency of the Labjackn.dll file. This is so common that we put that in the error message as you saw.

a) LabJackn.dll in your DF directory. This is obvious and you've checked

B) start DF by running app: you should always start DF by running the application or a shortcut to the application and never start it by simply clicking on your .ctl doc. If you want DF to open your doc automatically from an icon, create a shortcut to the DF executable and put the path to the .ctl doc in the path as described in the help under Other Features - Runtime

c) installed in multiple directories: if you installed DFE in two different directories, and then you removed the second one, then the path to DFE stored in the registry is now pointing to an invalid location

Anyhow, when you have time, post your contact info and a good time to reach you on our web form and we'll try and connect in and get it cleaned up for you. Really you should be able to install all the software, update it if necessary (if you have an old CD), then run it.

Link to comment
Share on other sites

  • 3 weeks later...

Ok, sorry that it took so long but things were busy around here. Have just filled out the contact sheet you suggested. Let's see. If we really get it going I will post here so others can also benefit.

With this project we are ok with Excel plus VBA which does not produce such errors. But I'd like to get some of my clients up a notch in automation.

Regards,

Joerg

Link to comment
Share on other sites

  • 2 weeks later...

Ok, did get in touch with Azeotech but meantime I already solved it. The usual, install it all again. The labjackUD driver date code from the Labjack site was only hours younger than the one that must have come with the DAQFactory upgrade but now it works. Mostly. Still got the occasional "dead in the water" situation with DAQFactory. However, I'll get to the ground of that later, a close and restart always fixes it for now.

Thank you for your help.

Regards,

Joerg

Link to comment
Share on other sites

Archived

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