Crimson 3.0 HOA code

phuz

Member
Join Date
Jun 2008
Location
Mohnton, PA
Posts
1,043
Before I drive myself nuts with the lack of programming documentation provided with Crimson, I'll ask you guys.

What is my best method for creating HOAs in Crimson? My thought was to have 6 tags (3 for HOA commands, 3 for HOA statuses), have 1 HOA generic graphic linked to those tags, and then on a device press, set those 6 tag sources through complex code, and open the HOA popup.

What I can't find is how to set the tag source in complex code.
Thanks guys.
 
I have used the built in HOA with one integer tag, no complex code. I believe it was the 3-state toggle selector I used.
 
Last edited:
I have used the built in HOA with one integer tag, no complex code. I believe it was the 3-state toggle selector I used.

Yes, but I won't be using that. We use CMD and STAT words with bit overlays, so I am using 3 cmd bits and 3 stat bits. I want to set the tag sources and I will be using buttons, not the included primitive.
Surely there has to be a way to populate the sources indirectly, like every other HMI allows, right?
 
Yes, and it is pretty easy using array tags, but I have only used arrays with SLC and Micrologix tags, not with Logix5k tags. So I will have to bow out and let others who have experience there shed more light.
 
That's OK, the format should be the same even if the addressing is different.
Do you have an example of how to set the tag sources?
Thanks.
 
Well, here's what I came up with.

On the main graphic, the operator can touch a device, which has complex code assigned to it. Every device is an index of an array.
[PLC1.DeviceNum] := 0;
ShowPopup(HOA);

Then on the HOA:
switch ( [PLC1.DeviceNum] ) {

case 0:
[PLC1.DOUT[0].CMD.AUTO] := 1;
break;
case 1:
[PLC1.DOUT[1].CMD.AUTO] := 1;
break;
}

And I just need to repeat it for all the devices. Easy enough to duplicate in excel and paste it back in, and I can get away with a single HOA template.
 
Well, I got so busy I could not create an example along the lines I was thinking. So I did it when I got home.

In my example, the tags are internal. If they were assigned to a PLC, I am not sure how that would work with Logix5K tag arrays... It might be as simple as setting the data source of the array tags to the first element of the PLC array.

In any case, in this example the HOA pop up is called by a function which receives the index passed from tag "x". On the HOA Popup, the indice "x" is used to allow the buttons to each write to the HOA_CMD[x] value. I could have used two lines of code per device instead of a function call, but wanted that detail in there in case it gives you an idea of a better or cleaner way to solve your problem. A function is just a program that can receive input parameters.

There is a separate program running "on tick" that copies the HOA_CMD to the HOA_IND array one element per second to simulate what might happen in a PLC. It is a little slow to go around the loop, but that is okay and somewhat helpful for me to test it.

I don't know if the example will give you some ideas how to make your situation work without having to have so much complex code, and with bit tags, but it might spawn some ideas. I am using values for states, but with very little work, you could either make those values match the bit patterns you wish to control or probably change the tags to bit level tags to avoid the possibility of changing bits in your overlay that must be untouched.

I have no idea why the graphic images I chose are garbled in the emulator. This happened to me last week on a project at work and Red Lion Tech support blamed in on the 64 bit OS. "The emulator is not supported on 64 bit machines." they tell me, assuring me that the stuff will look right on the real hardware. Well this machine at home is 32 bit and does the same thing...

So ignore the twisted motors and funky buttons if it does that to you...
 
Last edited:
Well, I got so busy I could not create an example along the lines I was thinking. So I did it when I got home.

In my example, the tags are internal. If they were assigned to a PLC, I am not sure how that would work with Logix5K tag arrays... It might be as simple as setting the data source of the array tags to the first element of the PLC array.

In any case, in this example the HOA pop up is called by a function which receives the index passed from tag "x". On the HOA Popup, the indice "x" is used to allow the buttons to each write to the HOA_CMD[x] value. I could have used two lines of code per device instead of a function call, but wanted that detail in there in case it gives you an idea of a better or cleaner way to solve your problem. A function is just a program that can receive input parameters.

There is a separate program running "on tick" that copies the HOA_CMD to the HOA_IND array one element per second to simulate what might happen in a PLC. It is a little slow to go around the loop, but that is okay and somewhat helpful for me to test it.

I don't know if the example will give you some ideas how to make your situation work without having to have so much complex code, and with bit tags, but it might spawn some ideas. I am using values for states, but with very little work, you could either make those values match the bit patterns you wish to control or probably change the tags to bit level tags to avoid the possibility of changing bits in your overlay that must be untouched.

I have no idea why the graphic images I chose are garbled in the emulator. This happened to me last week on a project at work and Red Lion Tech support blamed in on the 64 bit OS. "The emulator is not supported on 64 bit machines." they tell me, assuring me that the stuff will look right on the real hardware. Well this machine at home is 32 bit and does the same thing...

So ignore the twisted motors and funky buttons if it does that to you...

Hey, you're awesome. I'll check this out in a few hours.
Thank you!
 

Similar Topics

Hi Guys, New Crimson user here. I would like to create a Hand/Off/Auto from a 3-State Toggle button as I would in Wonderware with "Hand" and...
Replies
12
Views
5,480
Hi, I'm having an issue in crimson 3.0 when I create a programme using a case statement referencing a fault word that each bit needs to change the...
Replies
1
Views
75
How do you install update on Red Lion Crimson ver 3.1. Do I just need to run the exe file on the host server?
Replies
1
Views
92
Has anyone found a way to convert/replace/update the firmware on old Parker TS80xx series HMIs (i.e. TS8010, TS8006, etc) to accept Crimson...
Replies
0
Views
85
Has anyone setup communications with Red Lion 3.0 MODBUS to Baker Hughes Centrilift GCS VFD? Thanks
Replies
0
Views
81
Back
Top Bottom