Recent Posts

Pages: 1 ... 7 8 [9] 10
81
Support Questions / Re: RE: Make Global Object
« Last post by Archie on February 21, 2024, 12:01:42 PM »
If you Build the Solution, do you get any errors?
82
Support Questions / RE: Make Global Object
« Last post by zach_a_ary on February 19, 2024, 11:32:21 PM »
On the original post "Make Global object" by Tazmahal, I got up to step 10 of Archies instructions but "GroupObject"
was not in my toolbox. I tried putting the downloaded file under "Controls" and then it did pop up in my toolbox but it wouldnt let me drag it down to my form. Any ideas?
83
Thanks I had been looking at how C# code is different
84
Looks like you are using VB syntax in a c# program. c# is going to be stricter with case sensitivity and type conversions.

Your code would look something more like this:

            label4.Text = (int.Parse(label3.Text) - int.Parse(BasicLabel1.Text)).ToString();
85
I'm not sure what going on but I can't seam to correct the Errors

Below is my code;

using AdvancedHMIControls;
using System;
using System.Activities.Expressions;
using System.Activities.Statements;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace AdvancedHMICS
{
    public partial class MainForm : Form
    {
        public object BasicLabel1 { get; private set; }
        public object Label2 { get; private set; }

        public MainForm()
        {
            InitializeComponent();
        }

        private void MainForm_Load(object sender, EventArgs e)
        {
        }

        private void analogValueDisplay1_Click(object sender, EventArgs e)
        {

        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
       
        }

        private void OFDReader_FileOk(object sender, CancelEventArgs e)
        {
           
       

        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            Try
                Label1.Text = BasicLabel1.Text
                Label2.Text = Label1.Text - BasicLabel1.Text
            Catch ex as exception
                Label2.Text = ex.message
            End Try
        }

        private void label3_Click(object sender, EventArgs e)
        {
           
        }

        private void label2_Click(object sender, EventArgs e)
        {

        }
    }
}
86
Only the live value should be a BasicLabel. The other two will be updated via code, so they should only be of type Label.

- From the toolbox, add a Timer to the form
- Set the interval property to the time you want in milliseconds
- Set Enabled to True
- Double click the timer to get back to code
- Add code similar to this:
Code: [Select]
Try
  Label1.Text=BasicLabel1.Text
  Label2.Text=Label1.Text - BasicLabel1.Text
Catch ex as exception
  Label2.Text=ex.message
End Try
87
I am working on updating my HMI project on a "BasicTrendChart" on the 2nd page with 3 Basiclabels; 2 with the same registers address; 1st Label will display the current valve and the 2nd Label will display the current valve in a set time period (say in15 minute) note: the pressure values will be live data and all the labels will be updating every second, and the 3rd Basiclabel will display the difference value between the first and second label.
I know I will have to write a code to achieve my goal but not sure when to start.

Thanks for any help
88
Open Discussion / Re: Make Global object
« Last post by zach_a_ary on February 16, 2024, 03:26:21 AM »
I got up to step 10 of Archies instructions but "GroupObject" was not in my toolbox. I tried putting the downloaded file under "Controls" and then it did pop up in my toolbox but it wouldnt let me drag it down to my form.
89
Support Questions / Re: Modbus 16bit addresses Read Only
« Last post by cajunman64 on February 15, 2024, 05:19:23 AM »
Update; The information was correct and it works perfect....Thanks for the help
90
Feature Request / VLC control (for streaming UDP / RTS / IP video)
« Last post by smithpetermark@gmail.com on February 14, 2024, 03:38:16 AM »
The LiveVideo control is a little limited.  More cameras now are IP and I would like to stream in UDP video.  Can we get a VLC (or similar) control added to the toolbox?  Thanks.
Pages: 1 ... 7 8 [9] 10