Machine Automation Forum
A forum addressing machine automation solutions for the complete machine lifecycle. Including offers like Machine Advisor, Modicon PLC/PacDrive, Lexium or Preventa. Discuss and share knowledge on offers relating to cloud-based service platforms, machine localization and monitoring, industrial operations control, motion products as well as safety function!
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-12-11 03:41 AM
Hi everybody,
When using the display tab (currently using Ecostruxure Machine Expert HVAC 1.4.0) I am able to use variables through the application with the format @LocalParameters.varName, where varName is the name of the EEPROM or Status Variable being used.
However, if I need to change a variable using a Local or Global procedure, I need to use the Video_SetParam function which asks for a parameter number idx-Param
unsigned short Video_SetParam( unsigned char idxDevice, unsigned short idx-Param, unsigned char subIdxParam, unsigned long pVal, unsigned char type )
I can define a global variable and use the function this way (this example is taken from Large Chiller TDVA project provided by Schneider)
tempBOOL := TRUE;
retUINT := Video_SetParam( 0, ADDR_ALARMS_RESET, 0, ?tempBOOL, tyBool);
and declare the variable as constant.
However if I change the address of the variable in the PLC, this does not longer work.
So the questions are:
1) Is there anyway to link both variables with a different syntax in the procedure (something like retUINT := Video_SetParam( 0, @.LocalParameters.ADDR_ALARMS_RESET, 0, ?tempBOOL, tyBool);)
2) If it is not possible, what is considered best practices for keeping variable addresses synced in the PLC and the HMI ?
Thanks in advance.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-03-16 06:24 AM
Hello @otrotabi,
As shown below table the data input to "idxParam" is Unsigned Charcector of the address of the Variable.
What we can do as best practice is to always complete Main logic development first, then start with Display Page development.
Hope this answers your question
|
|||
Print a resources string using the current font set with |
|||
I/O |
Name |
Type |
Description |
Input |
|
unsigned char |
Index of device connected. |
|
unsigned short |
Index of parameter. |
|
|
unsigned char |
Sub-index of parameter. |
|
|
unsigned long |
Address of variable that contains the read value. |
|
|
unsigned char |
Parameter type. Available values: |
|
Output |
|
unsigned short |
Number of chars printed |
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-03-16 06:38 AM
Hi,
You can also, in your application, reserve a range of address in the Status (Ex: from 10 000 to 10 500) and Eeprom for variables that you will used in your logic and HMI.
Note: In this case those range should not be selected, if for any reason, you are doing a 'Recalc'
Hope this helps.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-03-16 11:25 AM . Last Modified: 2022-03-16 12:17 PM
Thanks for your feedback.
Ideally you might think of developing the core logic including all EEPROM and Status variables included before starting HMI devolpment but I think you will agree this is almost never the case. I guess we all start our projects simple and then add new functionalities and / or include whatever our customer has not told us initially.
If you access any variable through a page, there is no need to reconfigure anything in case you change it´s address (unless you change the variable name, in that case you need to change it in the page).
Why would you change a variable´s address ? Actually this does not happen very often once you have your project started but since Ecostruxure does not have the possibility to define Eeprom or Status Variables with a text editor (unlike what happens within programming) what I tend to do is start with a previous similar project so I do not have to deal with the tedious task of entering each and every variable I need in the project from scratch every time. I may add not only tedious but also quite an error prone process.
So generally after starting the project based on a previous one is when you may start deleting some variables, adding new ones and eventually re-arranging them and then it is when you may un-sync your PLC and HMI projects. Hopefully this makes my question more clear.
Regarding your table, please be aware that the output of the Video_GetParam function does not yield "Number of chars printed" (?). Output is 0 if the reading is correct and else otherwise depending on other factors. However you may get a succesfull read of a parameter without actually accessing the right parameter if the address is incorrect.
Regards
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-03-16 11:34 AM
Hi,
I understand your point...
Just for info, you can copy the Status & Eeprom table to an excel sheet and edit it.
Once done, you can copy back the selected zone (Rows and Columns) back to the respective Status or Eeprom table in the software.
Note: make sure that you select the same amount of column..
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-03-16 12:21 PM
That´s great ! And how do you that ? Like Ctrl C Ctrl V ? I do not see any export / import functionality.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-03-16 12:38 PM
Ok. Almost there .....
Ctrl-C Ctrl-v selecting all rows in Ecostruxure I was able to copy the whole Eeprom table. A column is created before the addresses column. when I paste it to a blank sheet.
I guess I should be able to delete all variables in the project, modify whatever I want in Excel and then Ctrl-C Ctrl-V back in Ecostruxure ? This last part does not seem to work so simply. What is the trick ?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-03-16 12:48 PM
You need to mark one row in ESME HVAC and then past the data from the excel file to this row.
And you need to mark in the excel file all row including the IPA row which occurs in the front an the description and the note row on the right side.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-03-17 05:28 AM
No. I am afraid I can not figure it out.
Maybe this video could help you to point me hwat I am doing wrong. The video reflects that I am using LibreOffice in this PC, but I tried the same on my laptop with Excel and I get the same result.
https://www.youtube.com/watch?v=P-sTrCaEaXk&ab_channel=JoseTabisi
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.