User Components

Recommended Posts

I Have 3 buttons, Button_1,Button_2,Button_3

I group the Buttons in group Called 'buttons'

I Create a property called channel_name on the group.

How do i get Button_1 to read buttons.channel_name???

I am looking to Create a User Control where set a single property.

the Action on each button would be like channel_name=1 or for button 2 channel_name=2

Link to comment
Share on other sites

Ok so Indicators etc can be easily done,

But How do i detect the 'Property' Change to run the script to repopulate the StrExpression

And with Buttons the only way i see is to Addlistener is that correct.

I know my Question are probably outside the Normal Scope but we Regularly create fairly large Projects Normally with one of Main SCADA players (and Very Expensive Licensing)

So Far DAQ is Performing Very Well, and in some area i actually prefer it to the Normal RsView, Wounder and the like.

One item i am now working on is we have 10x(2 32bit words) coming from the controller consisting of 64 status bits per.

I am creating a Component that i can set the 2 channels in the property, and then the have 64 indicators display the contents.

Just as a foot note, it might be worth creating a area in the forum for examples of peoples work and Stuff.

I recently got round an HTML Email attachment problem,

By firstly creating the Email Template in word or Such and putting place holders for the important stuff $GRAPH1 etc.

in Script opened the relevant graph page and saved the image as a jpg.

FTP'd, the images to our server or you could a hotmail skydrive or anything.

opened the Email Template and Used Replace($GRAPH1,www.xxxxx/graph.jpg) with the FTP's address.

and sent the email.

The email Arrives as a standard HTML email, with all the Header images etc. but all the images & Attachments are stored on the FTP.

Fairly Simple Solution but it took all Night before i Gave up on Attaching the images and files directly to the HTML email

Snippets of code that people have used to solve problems in a slightly creative are always handy

Link to comment
Share on other sites

I usually just update embedded controls from the OnRefresh of the parent. It doesn't cost much to change these every refresh.

Also, if you are displaying status bits, have you considered just using check boxes? There is an array feature on checkboxes, so you can use a single checkbox control to enable viewing and setting a whole slew of bits.

As for sample snippets, we definitely encourage posting them. You can just post it under whichever topic is appropriate. If you (and others please chime in) think we should have a separate section just for snippets, we can certainly add it.

Link to comment
Share on other sites


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