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 - leesxz

Pages: [1]
1
Feature Request / Re: Message Display by Value question
« on: April 04, 2018, 12:02:05 PM »
Hope it helps. I wasn't quite sure how to handle the conversion from bool to integer (considering the value is a string) so I wimped out and butchered that part. So, if you see that part just understand that's not best practice. :)

I use Convert.ToInt32(bool) to convert bool to integer. True returns -1 and False returns 0.

 

2
Feature Request / Re: Message Display by Value question
« on: April 03, 2018, 05:28:21 PM »
The MessageDisplayByValue is used to create a list of messages each with a unique integer value assigned to them. The PCLAddressValue is then pointed to an integer in the PLC that is used to select which message in the list to display.

If you are just looking to display a single message based on a Boolean value, then you can use any number of controls with the PLCAddressVisible property, such as the BasicLabel.

Thanks for your answer!

I just read your sample of message display by value. It helps a lot!

I created a control that is basically an analog display and multistate combined.  I added it to a base project, version 3.99x (I believe).  It will allow bool for states of 0 and 1.  You can download here:
https://drive.google.com/file/d/1_2H0OgWjSnOXPiKPDymz_vMITjE_Pi9m/view?usp=sharing
You can test with Modbus sim.

James

Excellent!

It is really a good example for me!

Thanks for your help, James!

3
Feature Request / Re: Message Display by Value question
« on: April 02, 2018, 09:10:01 PM »
The MessageDisplayByValue is used to create a list of messages each with a unique integer value assigned to them. The PCLAddressValue is then pointed to an integer in the PLC that is used to select which message in the list to display.

If you are just looking to display a single message based on a Boolean value, then you can use any number of controls with the PLCAddressVisible property, such as the BasicLabel.

Thanks for your answer!

I just read your sample of message display by value. It helps a lot!

4
Feature Request / Re: Message Display by Value question
« on: April 02, 2018, 08:35:30 PM »
When I want to do expressions in ahmi what I usually do is use a datasubscriber2.  So, if you add 3 addresses on the data change event you can use the results in VB code. I can throw together an example if interested. The only time I've done that though is when it's inside of reusable code. I wouldn't do it for native controls, like an indicator. In that case it's still easier and better to do it in the plc.
Thanks for your kind!


If you can throw an example, that will be perfect!

5
Feature Request / Re: Message Display by Value question
« on: April 02, 2018, 06:13:21 PM »
1-Is that thing only support analog input? When I use Digital input, it appears invalid return.
When you say analog input, I will assume you mean an integer value. Any control with the PLCAddressKeypad property will accept numeric input, such as the BasicLabel. Put a valid PLC address in that property, then when you run the application, you can click the control to get a pop up keypad.

Yes. When I use X0(in my PLC is 12049) as input, the message shows invalid return! True(False). That's why I ask this Message display by value component only take the analog input.
I'm still not sure if I am answering your question correctly. At first when you said analog input, I assumed you meant to write an analog value into the PLC. Now it sounds like you mean input from the perspective of the control.

For MessageDisplayByValue, you need an integer value, otherwise you would only have the possibility of 1 message.

How are your messages represented in your PLC? Is there an individual bit for each message? Does each message have a corresponding numerical value?
So what I do is I input X0 address into PLCaddressvalue, I assume when X0 takes voltage the value should be 1 and show the message of value 1. But I found when X0 takes voltage, it returns True and False without voltage. That is the question I have. I am not sure how the component works.

6
Feature Request / Re: Message Display by Value question
« on: April 02, 2018, 06:07:53 PM »
Thank you for your reply!

What I want is that when coil1&coil2 are 1, the indicator becomes red. When both are 0, it becomes green. I am not familiar with VB program. And when I want to read detailed code of AHMI, I found it is private. So I cannot follow the programmed programs.
If you aren't familiar with VB then I suggest you do the code in the plc. I usually create a routine in the plc used for HMI animation. I will do this even in the HMI software allows for scripts and expressions. It's a little more work and memory, but it's usually easiest for all involved.

Thanks for your suggestion.

I have done it with PLC. But at last, I want to use AHMI read array from textfile and allow me to do more things. So I want to learn how to design a component by myself. Though I am not familiar with VB, it is not bad for me to learn it.

7
Feature Request / Re: Message Display by Value question
« on: April 02, 2018, 03:21:51 PM »
1-Is that thing only support analog input? When I use Digital input, it appears invalid return.
When you say analog input, I will assume you mean an integer value. Any control with the PLCAddressKeypad property will accept numeric input, such as the BasicLabel. Put a valid PLC address in that property, then when you run the application, you can click the control to get a pop up keypad.

Yes. When I use X0(in my PLC is 12049) as input, the message shows invalid return! True(False). That's why I ask this Message display by value component only take the analog input.

8
Feature Request / Re: Message Display by Value question
« on: April 02, 2018, 03:06:52 PM »
Thank you for your reply!

What I want is that when coil1&coil2 are 1, the indicator becomes red. When both are 0, it becomes green. I am not familiar with VB program. And when I want to read detailed code of AHMI, I found it is private. So I cannot follow the programmed programs.

9
Feature Request / Message Display by Value question
« on: April 02, 2018, 02:45:58 PM »
I am new to both advanced HMI and VB. I am confused with how to use Message Display by Value.
1,Is that thing only support analog input? When I use Digital input, it appears invalid return.
2,In some cases, I need use several PLC address as input. But most components are only support one PLC address input. How can I input several PLC program to control like basic indicator?


Thanks for your reply!

Pages: [1]