News:

SMF - Just Installed!

Main Menu

Console Configurator

Started by rangeyrover, January 31, 2010, 10:18:06 PM

Previous topic - Next topic

rangeyrover

Is there a way to style the message box border in the console configurator?
I want to be able to have an optional label on equipment shown in the console.
I have managed to work this out by having message boxes as labels, but the borders are ugly and unnecessary in this application.

Also, I can only get the console to work if it is in the console directory. Is this intended?

I have attached the program and console program which is a simple mimic of track circuits in a signalling system at the moment, with controls for occupancy of the track circuits.

I am very excited at using IPAC with EasyPLC http://www.ultimarc.com/ipac1.html 64 inputs for not very much spend, do you think it will work well with EasyPLC?

Thanks for a great program. I need to get this simulation working, then I can justify the spend to my boss to buy the program.

Regards
RR

[attachment deleted by admin]

EasyPLC_Master

No, for the moment is not possible to style the message box control in the console, you can only change the height, width, backcolor and font properties.

You can use labels easily, in the label's text property you can type [Dx] then the label's text will be replaced by the content of the plc data stack number x. For example if you insert in the console a new label and type in the text property [D5], then when the PLC pass to run mode and shows the console in the label you will see the content of the data stack element number 5 (remember that the data stacks elements can be numbers or text).

Yes, the console files ALWAYS must reside in the EasyPLC Console folder, this is not configurable.

As I have seen the IPAC device is a Keyboard emulator, then you must be able to manage it with the Key control of EasyPLC contacts.

Feel free to have any questions, if you still have doubts.

Regards!

rangeyrover

#2
Hi,
Thanks for the quick response. I really like the console creator, I just wish that there were more options available to me.
I need a button that will respond differently to right mouse click and left mouse click is this possible?
I also really need to be able to make a picture act as a button whilst not looking like one.
Would it be possible in the future to have common objects that you would find on a panel like switches, buttons and indication lamps built in as common objects? Or the facility to be able to create them?

My main need at the moment is for a picture to act as a 3 position switch (pressed, middle, pulled) without having to have seperate buttons for that purpose.

I think the IPAC is a great idea, but on counting I need 52 outputs, so I will end up buying phidgets for this I think which will give me the 16 inputs that I need.

I'll submit a program again when I have something more meaningful.


EasyPLC_Master

For all the users that need advanced HMI functions, a solution was created, the HumanInterface External Library, this component allows to customize totally your console, but the programming must be done by code, I will try to send you an example of how to use for your specific needs. Any way you can see how it works in the tutorial EasyPLC example program called Sample_Ext_1.


EasyPLC_Master

I'm attach the example I tell you before, here the HumanInterface External library is used to create a customized console window.
See how the picture box is used like a button, when you press on it the image changes, then I think you can use it like you want (switch with 3 positions) you only need to copy the image files (switch positions) on the EasyPLC Grafs folder and change the code to assing this files when the mouse click on the picture.

For the moment is not possible to read a right click on one command button, but I will analize if there possible to apply some trick to solve this option.

Its a good idea the possibility to have a library of objects as you told me, I will study the possibility to add in next releases. Anyway I think the HumanInterface External library can provide this behaviour (with a little bit of work!!! :))

Regards.

[attachment deleted by admin]

rangeyrover

Thankyou.
I can see the logic in the script and can apply it.
I was struggling to lose the border on the picture, but now you have shown me.
Is there a complete reference for the script library?
The PLC script reference does not include "borderstyle" on it's own.

Anyway 5x phidgets 0/16/16 have arrived, and the control panel has been rewired.

Looking at the code,
H.AddPictureBox
H.window.picturebox(1).left=4200
H.window.picturebox(1).top=3000
H.window.picturebox(1).width=1400
H.window.picturebox(1).height=1400
H.window.picturebox(1).picture=H.LoadImage(PLC.AppPath & "\Grafs\nirtec.jpg")
H.window.picturebox(1).Borderstyle=0
H.window.picturebox(1).visible=TRUE

What units are the sizes for the numbers in please? I cant understand the relationship between picture size in pixels and the sizing of the picturebox?

Thanks for putting up with all the questions!
RR

EasyPLC_Master

There's a reference about the Human Interface library (and all the EasyPLC external libraries) to see it you must select any Phase or block that accepts the script language, then on the lower tool tree click in the PLC Script Reference, the a new window appears showing all the script functions/procedures available and the information about the parameters/returned values.
I'm going to send you a video explaining this procedure, this video is a exe file, that allows more compression ratio.

The sizes are Twips, this is a measuring unit used by Visual Basic, the Human Interface library is written in this language for this reason are used the same units. A very useful trick is to use Visual Basic 6.0 to design your window, once is finished copy the values of the elements placed on the form in your script code, then you earn a lot of time. Also you must to know that all the Human interface elements available (command buttons, picture, labels, text boxes, etc...) have the same properties that the Visual Basic controls.

Regards.

rangeyrover

Thanks Rafeal
I am on holiday for the next week so wont get chance to work it through till after then.
We got the control panel working with the phidgets today, inputs and outputs.
Some serious programming to take place to drive it now.

rangeyrover

Getting on well with the program.
Is there an easy way to reset the datastack at the initial start of the PLC?
I tend to get artefacts of outputs if I stop the program in the middle, which I have just spent 15 mins debugging only to realise that I didn't make it come on...
Thanks

EasyPLC_Master

Yes, of course, you can do it manually pressing the toolbar button Reset All (see picture 1) or you can do it automatically when the PLC pass to stop mode, click on EasyPLC Menu -> Preferences -> Resources and select PLC Stop Mode makes total Reset (picture 2).

Regards.

[attachment deleted by admin]