Dynamic Arrays and Data Entry Studio 5000

2 posts in this topic

So we have a PLC project coming up and its our first one and understand and can execute most of the sequence without issue.  The part that is getting me is how to handle the following efficiently using studio 5000 and panel view.


  • AHU has to be able to run test cycles
    • User selectable up to 250 steps in a test cycle
      • User selectable temperature setpoint for each step
      • User selectable humidity setpoint for each step
      • User selectable time duration for each step


I thought about using arrays but as i understand the allen-bradley plcs to change the array size you have to go offline and then back online so you could not change it dynamically.  Was considering doind this with reading the dataset from an excel document the user would edit.

The other option for me is to have a static arrays size and then based on the number of steps the user select have the routine only execute x ammount of steps, which is done easy enough.  Big thing is after the code portion is lined out is there a way to dynamically change the hmi graphics to only display certain steps for the user to edit, maybe by using an array of bits that are on and off for visibility and then having a GUI object be shown or hidden based on that bit?

Share this post

Link to post
Share on other sites

I think you're on the right track. You would have to set up a static array big enough to handle the biggest test (plus a little, because you know they'll want more later....).

Basically, you're talking about recipes. My first thought would be to store the recipes in the PLC, because that's what I've seen done the most often. Maybe create a UDT called Recipe_Type (or whatever you want) and inside it create tags, like Temp_Setpoint, Humidity_Setpoint, Time_Setpoint, Part_Name, Num_Of_Steps, etc. The setpoints that change per step would need to be arrays, of type REAL[250] (a 250-element array of floating point numbers). The others can be whatever is appropriate. Then you can create an array to store the data in the PLC called Recipe_Storage (or whatever) of type Recipe_Type[xx], where xx is the number of part numbers they'll have to run. In other words, if they're asking for the capability to store 100 different sequences, you'd need the data type to be Recipe_Type[100] for what they want now, but you'll want to make it bigger to allow room for more later. When the operator selects a recipe, say recipe #50, the system would copy the data in Recipe_Storage[50] to Active_Recipe. Then the HMI could base visibility of the settings for individual steps on whether that step number was less than or equal to the number stored in Active_Recipe.Num_Of_Steps.

Importing from Excel will be tricky and will take some software external to the PLC to write the data from the PC to the PLC and back.

If you use the PV+'s recipe functionality, you MAY be able to export/import the recipe data from the HMI to a flash drive that you could then edit. I've never done that, so I don't know how easy/hard that would be. I do know that the PV+ can do datalogging to internal memory, flash drive, or FTP site, so the recipe may be able to be imported/exported the same way. I poked around a little in FT View Studio and didn't see it, but that doesn't mean it can't be done.

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