09-08-2010 07:37 AM
I have recently added another two RLY-421 modules to my fieldpoint system. Can someone give me a couple of ideas on how best to ogranize the block diagram when you have 24 relays to switch. Most of the time I'm using a state machine to step through a automation process changing the relays on or off depending on a clock or timer. I have tried a cluster and array method which worked well for a few relays, but as I expand it started taking up to much room in the block diagram. I went to only dropping into each case just the relays I need for that step. Can anyone give me a nice clean way to handle the control of a large number of relays?
Thank for the help.
Danny
09-08-2010 08:10 AM
Put your fieldpoint addresses in an array as well.
Redefine your cluster so that your True and False values are not elements in a cluster, but an array themselves. Then inside your curren For Loop, you can create another For Loop where you auto-index through your array of T/F constants as well as your fieldpoint addresses so that you only need one Fieldpoint Write that is inside the inner most For Loop.
09-08-2010 09:30 AM - edited 09-08-2010 09:34 AM
Ravens Fan,
That is a great idea. I had some problems trying to figure out how to creat the array of the fieldpoint address but I think I figured it out. I still must have done something wrong on array test.vi though because it turned on then off all four relays in the same pattern instead of turning relay one on and the other three off. Where did I go wrong with the indexing?
Thanks again for your help.
09-08-2010 10:05 AM - edited 09-08-2010 10:10 AM
Hi Danny,
I think that you only needed one for loop otherwise you get the result that you found.
You might also consider using the All rather than individual channels, this then accepts an array to control all 8 channels at once.
Cheers
Stephen