Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: AustinT on January 23, 2020, 03:05:23 PM

Title: Wx to broadcast address
Post by: AustinT on January 23, 2020, 03:05:23 PM
Is it possible to use a broadcast for the wx command ? 
Title: Re: Wx to broadcast address
Post by: RBPLC on January 23, 2020, 05:48:16 PM
Could you use Peerlink?
Title: Re: Wx to broadcast address
Post by: ATU on January 23, 2020, 07:32:45 PM
This might be helpful
https://forum.hosteng.com/index.php?topic=2812.msg22587#msg22587
Title: Re: Wx to broadcast address
Post by: franji1 on January 23, 2020, 07:35:06 PM
No.  As RBPLC mentioned, PEELINK is a good way to share data across multiple PLCs.  You can actually have an unlimited number of PEERLINK "subscribing" PLCs, and up to 16 "publishing" PLCs.

So, technically, you could have 1 PLC broadcasting 256 WORDs of data every 100ms to hundreds of PLCs "listening" to that "broadcast".
Title: Re: Wx to broadcast address
Post by: AustinT on January 23, 2020, 07:35:53 PM
Hi , no I tried that initially but I need to do conditions on setting up the peer link . Case 1- peer link with a configuration case b , a peer link with a different setup .  Since I can only have one peerlink it will not work .
Title: Re: Wx to broadcast address
Post by: AustinT on January 23, 2020, 07:38:24 PM
Are there any bits to change the configuration of peerlink during runtime ?
Title: Re: Wx to broadcast address
Post by: RBPLC on January 24, 2020, 05:54:41 AM
What is meant by configurations? Could you set up logic in the Main program to change which values are written to PL memory for your different configurations?
Title: Re: Wx to broadcast address
Post by: BobO on January 24, 2020, 07:34:42 AM
You can broadcast from a UDP device. It?s not hard to roll your own protocol with PACKETOUT and PACKETIN.
Title: Re: Wx to broadcast address
Post by: AustinT on January 24, 2020, 08:33:19 AM
What is meant by configurations? Could you set up logic in the Main program to change which values are written to PL memory for your different configurations?
I have 3 brx plc?s that I want to have the exact same program . The only thing that can be different is the IP address .  The lead plc will not always be the same one . Right now it is working by using wx and writing to all three ip addresses , one at a time. One of the wx instructions is blocked however in each plc because it compares the three ip addresses and blocks sending it to itself .  It?s working fine so I?ll probably leave it alone . I just wanted to see if there is a cleaner way to do it .
Title: Re: Wx to broadcast address
Post by: AustinT on January 24, 2020, 08:35:34 AM
You can broadcast from a UDP device. It?s not hard to roll your own protocol with PACKETOUT and PACKETIN.
Thanks , I?ll see if these instructions will help clean up my code