Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Godra

Pages: 1 ... 92 93 [94] 95
1396
Tips & Tricks / Freehand Drawing on the main form
« on: January 21, 2015, 03:43:09 PM »
If anyone might find it useful here is a link for video that shows the code:

https://www.youtube.com/watch?v=U0Z1IEOFGe4  (change pen color to some other than black since AHMI screen is usually black)

And if you ad the same "If" loop but for the Right mouse button and change the code to:

Me.CreateGraphics.DrawLine(New Pen(Me.BackColor, 60), last.X, last.Y, e.X, e.Y)

then you can erase the lines when holding the right mouse button down.

This freehand drawing didn't  go over or affect the controls on my form and could be used for presentation purposes or similar.
Don't get surprised if a certain control does get affected by this drawing.

1397
Additional Components / Re: Quick Chart
« on: January 21, 2015, 02:22:24 PM »
Here is the solution with sound set to play every 3 seconds (the sound itself lasts for 2 seconds).

It might get somewhat noisy every now and then.

The ALARM feature seems to be working fine and could be used for continuous monitoring along with AUTO mode (since this mode is displaying the last 100 today's points only).

You don't have to have all 3 log files present in the root of drive C:.

1399
Support Questions / Re: MessageListByValue Invalid time stamp
« on: January 14, 2015, 12:17:27 AM »
Not sure if this might help but here is a picture of time formats on my computer.

1400
Additional Components / Re: Line shape as AHMI control
« on: January 13, 2015, 11:46:38 PM »
One of the later posts has a better choice for the line control. See further below.

Here are 3 separate and simple controls that allow for horizontal, vertical and diagonal line drawing (no rotation on either). Each one responds to a single bit on both fields: PLCAddressValue and PLCAddressVisible.

Diagonal line can be created Left-to-Right or Right-to-Left under almost any angle.
Horizontal line is created when rectangle width > height.
Vertical line is created when rectangle width < height.
If I ever manage to put all 3 in a single control, it will be posted here.

It was created in v3.97a and from the BarLevel control. Rotation feature might come in the future ... if I manage to figure it out.

The idea behind this was originally posted here: http://www.vbforums.com/showthread.php?657238-RESOLVED-LineShape-control

Edit: Check the last post for almost a perfect replacement for LineShape control

1401
Tips & Tricks / Re: Build a gage with the AnimatedPictureBox
« on: January 12, 2015, 11:25:40 PM »
I am trying to make this work but it just wouldn't respond to a PLCAddressRotationValue set to a timer accumulator with a preset of 10.

After changing all instances of PLCAddressRotationValue to PLCAddressImageRotationValue inside AnimatingPictureBox.vb (#Region "PLC Related Properties") then I got the needle to respond to the timer accumulator and also to integer values of the analog input on MicroLogix 1000 Analog PLC.

The same applies to PLCAddressTranslateXValue and PLCAddressTranslateYValue.

1402
And here is 4 more icons but this time 16 color 32x32.

Try to use 1 and 3 for exe file, 2 and 4 for the form.

1403
Additional Components / Re: Quick Chart
« on: January 11, 2015, 11:27:49 PM »
I did manage to squeeze in 1 more log file but since running out of space and colors, this is the last version for me.

Attached are also 3 fake log files and all solution files so just load it in Visual Studio and give it a try.

This program has been refined as much as possible considering my current programming skill level.

The version with sound is in the next post.

1404
Support Questions / Re: disappearing datasubscribers
« on: January 11, 2015, 03:51:11 PM »
I have noticed something opposite of that.

Every now and then when opening a project a new instance of a driver, other than the one I selected, would appear on forms other than the Main Form (EthernetIPforCLXCom).

Not a big deal since I just delete it, but your case is different.

Just checked v3.96 and Page2 already has ModbusRTUCom1 driver on it.

Wild guess, Archie was doing some testing with it and left it there.

1405
Additional Components / Re: Quick Chart
« on: January 11, 2015, 03:17:02 PM »
This is also a part of the previous post so I could attach the standalone executable file as well.

1406
Additional Components / Re: Quick Chart
« on: January 11, 2015, 03:12:57 PM »
Here is a bit improved Quick Daily Chart program, with AUTO REFRESH and ALARM options included (not necessarily perfect but definitely usable). Due to the way this program works, the Alarm should be used more for analysis than live monitoring since the same value that will trigger it the 1st time will trigger it again during the day (so use it once per day as live monitor). You could set the Low or the High or both together and the values could be negative or positive.

With all the posts in this subject, there should be more than enough information for anyone to try to replicate this project, figure out the code and hopefully improve it. It is definitely a good programming practice.

1407
Additional Components / Re: Quick Chart
« on: January 07, 2015, 08:35:49 PM »
Excellent thinking to save a lot of time for all the people.

And for those who might be able to use a standalone executable file, here it is but remember the following:

1) The program defaults to reading C:\PLCDataLog1.log and C:\PLCDataLog2.log files, so make sure that you have both of these present in the root of drive C: (even if one of them has no data recorded, ie. it is empty, the other graph will still show - the version with sound further down below doesn't require these log files to be present)

2) These log files are created by BasicDataLogger AHMI control and, once added to any project, just change the name of the log file in FileName property to reflect the above, but don't change the TimeStampFormat.

3) If you wish to make any modifications then you will have to use the code from previous posts.

1408
Additional Components / Re: Quick Chart
« on: January 07, 2015, 04:27:11 PM »
Additional filter by Hour has been implemented to reduce any possible clutter (this was a bit tricky for me but the code appears to be working just fine).

Also attached are icons I used for the Main Form (icon 2) and for executable file .exe (icon 1).

1409
Support Questions / Re: Show Ip adrress when form loads
« on: January 05, 2015, 10:28:31 PM »
For Main Form you could use the load event (double click the Main Form and it should show right away):

Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        BasicLabel18.Text = EthernetIPforPLCSLCMicroCom1.IPAddress
    End Sub

The way I am thinking, a timer added to the form could work as well and should be updating the label text property for the interval specified (like 1000 or 2000 milliseconds).

Archie might have better answer anyway.

1410
Additional Components / Re: Quick Chart
« on: January 05, 2015, 09:52:22 PM »
For me this is a "work in progress" and a good way to practice VB programming (have learnt a few tricks so far).

If anyone finds a good use for this then good for you.

The graphs might get cluttered, since they are static, and should generally be good for smaller log files. In order to reduce this possible clutter I included check boxes for each series and also a filter by Date (which makes this now a daily chart).

Check the attached pictures and the code and try to replicate it, if you have time of course.

1 log file with fake data is also attached. Make a copy of it and rename it with number 2 at the end (modify values just to make it slightly different than the original).

Pages: 1 ... 92 93 [94] 95