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 - joko markono

Pages: [1] 2 3 ... 9
1
Support Questions / ERROR AFTER FEW TIMES REBUILD
« on: September 10, 2023, 11:41:10 PM »
Hi, I'm getting these warnings and errors after few times rebuilding the solution.
how to resolve it?

2
Support Questions / Re: Rotational Indicator Counter
« on: September 04, 2023, 04:54:45 AM »
That code looks like somebody was testing certain values.

Maybe try the following code, it has not been tested by me and might need some corrections:

Code: [Select]
    Dim Delta As Integer
    Dim Last_Angle As Integer = 360
    Dim Total_Turns As Single

    Private Sub RotationalIndicator1_ValueChanged(sender As Object, e As EventArgs) Handles RotationalIndicator1.ValueChanged
        Dim Current_Angle As Integer = RotationalIndicator1.Value

        '* Determine Delta (CW or CCW)
        If Current_Angle > 180 AndAlso Last_Angle = 360 Then
            Delta = Last_Angle - Current_Angle
        ElseIf Current_Angle <= 180 AndAlso Last_Angle = 360 Then
            Delta = Current_Angle
        Else
            Delta = Current_Angle - Last_Angle
        End If

        Total_Turns = Total_Turns + ( Delta / 360 )

        RotationalIndicator1.Text = Total_Turns.ToString("0.0")

        If Current_Angle = 0 Then
            Last_Angle = 360
        Else
            Last_Angle = Current_Angle
        End If
    End Sub

I tried this and seems working but because I don't have the compass with me, I can't tell whether it is 100% working. my only concern is the indicator will not display 360, after 359, it will be 0 again. so, I can't tell if the code is fully correct until I got the physical compass later.

3
Support Questions / Re: Rotational Indicator Counter
« on: August 30, 2023, 02:33:00 AM »
how to convert this to vb.net please?
it looks like C# and I used the converter but no luck.

Code: [Select]
int Start_Angle;    // The first compass reading to mark our beginning rotation.
                    // signed int, will range 0 to 359
int Last_Angle;     // preserve the value of the last reading.
                    // signed int, will range 0 to 359
int Current_Angle;  // computed position for where we are now.
                    // signed int, will range -720 to +720

void Init_Rotation(int Current_Pos);
void Get_Rotation(int Current_Pos);
                                   
void main(void)
{
  Init_Rotation(10);
  Get_Rotation(20);
 
  Init_Rotation(10);
  Get_Rotation(350);
 
  Init_Rotation(90);
  Get_Rotation(271);
 
  Init_Rotation(20);
  Get_Rotation(10); 
 
  Init_Rotation(350);
  Get_Rotation(10); 
 
  Init_Rotation(271);
  Get_Rotation(90); 
}

void Init_Rotation(int Current_Pos)
{
  // set Start_Angle, Last_Angle,
  // and Current_Angle to the current reading
  Current_Angle = Last_Angle = Start_Angle = Current_Pos;   
}

void Get_Rotation(int Current_Pos)
{
  // will take the current reading,
  // compute the Current_Angle,
  // then update Last_Angle, and Current_Angle
  int Delta;
 
  // compute delta angle
  Delta = Current_Pos - Last_Angle;
 
  // put Delta into range of
  // -180 <= angle <= 180
  if (Delta > 180) Delta -= 360;
  if (Delta < -180) Delta += 360;
 
  // update Current_Angle
  Current_Angle += Delta;
 
  // update last reading with our current reading
  Last_Angle = Current_Pos;   
}

my main problem is that I don't quite understand this part:
Code: [Select]
void main(void)
{
  Init_Rotation(10);
  Get_Rotation(20);
 
  Init_Rotation(10);
  Get_Rotation(350);
 
  Init_Rotation(90);
  Get_Rotation(271);
 
  Init_Rotation(20);
  Get_Rotation(10); 
 
  Init_Rotation(350);
  Get_Rotation(10); 
 
  Init_Rotation(271);
  Get_Rotation(90); 
}

what is does actually?

4
Support Questions / Re: Rotational Indicator Counter
« on: May 22, 2023, 05:59:04 PM »
I have tried that but that only true if the direction starts from 0,1,2,3.... 359
what if it starts like this, 0,359,358,357,356....1?

also if the value pass trough 0 again, then the no. of turn will turn back to zero.

5
Support Questions / Rotational Indicator Counter
« on: May 22, 2023, 06:17:02 AM »
Hi All,

I want to do a counting on number of turn on the rotational indicator on both direction.
For example, if my arrow has made twice clockwise turn, it will show 2 on my apps.
same for CCW. How can I do that on VB.net for this control?

6
Support Questions / Re: Startup Form
« on: May 09, 2023, 11:53:36 PM »
surprsingly, after few times of rebuilding, all become fine again.

7
Support Questions / Re: Startup Form
« on: May 09, 2023, 09:49:16 PM »
igot following error, maybe the gtrackbar is not that critical but how to solve the last two errors?

8
Support Questions / Re: Startup Form
« on: May 07, 2023, 08:59:47 PM »
that has made my application totally crash, can't even load the form. VS not responding at all. tried to search for the deleted folder, but not in recycle bin, guess I've to redo all again.

9
Support Questions / Startup Form
« on: May 04, 2023, 09:18:02 PM »
Hi, I need to start the app from a different page. but the drop down menu only shows MainForm.
Can someone help please. Also I got this message at the Compile section:
An error occurred trying to load the page.
Object reference not set to an instance of an object.

is it meant to be like that?

11
Open Discussion / OmronSerialHostlink PLC to HMI Response
« on: August 27, 2020, 06:37:59 AM »
Hi All,

I'd like to hear you guys experience regarding the use of this driver.
I'm using a Omron CJ2M with 9600 7 2 E setting using RS232.

So far it works only that the response is a bit slow sometimes it could take up to 3 second to see a change on the HMI. attached is the screenshot.

i guess i have same issue with this guy: https://www.advancedhmi.com/forum/index.php?topic=2763.0

i'm not sure if the whole tab page is updating at the same time. if yes, can someone tell me how to stop updating the hidden tab page?

12
Tips & Tricks / Analog cylinder
« on: August 27, 2020, 04:17:14 AM »
this is an option to escape the problem with the current analog cylinder issue: https://www.advancedhmi.com/forum/index.php?topic=2572.msg15477#msg15477

1. create a cylinder housing using a picturebox. you can set background image to represent a cylinder housing.
2. create a cylinder rod using BarLevel. set show value to False. Play around with properties to get your desired display. set the FillDirection to represent the in/out movement of the rod.

you can create vertical and horizontal cylinder with this easily.

13
Open Discussion / Re: Pie chart?
« on: August 24, 2020, 10:59:20 PM »
BTW, i use Dev Components Dot Net Bar. you can google it.

the tutorial To use the chart Is here: https://www.devcomponents.com/kb2/?p=894

14
Open Discussion / Re: Pie chart?
« on: August 24, 2020, 09:50:43 PM »
not sure if you had your problem solved.

this might help:
https://www.youtube.com/watch?v=gqo2TGpCOlA


15
Hi All, as per subject mentioned, anyone aware of any software that has the function?
Thanks.

Pages: [1] 2 3 ... 9