Sign in to follow this  
Followers 0
BITS N BYTES

Change value of Members within Data Type of Stucture

3 posts in this topic

Trying to figure out how to change values within a Global Variable of Data Type of Structure. I have declared a Data Type as a STRUCTURE with five MEMBERS. Four LREAL and one BOOL. STRUCTURE is named "Par_LREAL". Declared a Global Variable "HMI_Vaxis_SPEED" using the above structure Data Type "Par_LREAL". Within my POU I now wish to use the Global Variable "HMI_Vaxis_SPEED" and modify values of it associated members. Have written ST code to write values to the members. For example the ST statement "HMI_Vaxis_SPEED.Min"=LREAL#10.00;" When I start simulation these values are NOT written automatically though they can be manually modified. Can anyone shed light as to why the code in the POU is NOT writing the values. Baffled!!!

Share this post


Link to post
Share on other sites
Have you added the POU to run in a task under "Task Settings"?

Share this post


Link to post
Share on other sites
U DA MAN!!! Even though project task settings in project were correct, the checkboxes to"enable" the tasks were unchecked. Checked them and all works great. I have to say that this IS rather confusing and a real GOTCHA if one is not fully aware of the implications of these check-boxes! Thnx a million for your help. Edited by BITS N BYTES

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0