https://www.automationdirect.com/brx
(VID-BRX-0029)
This video is part 3 of a 3 part series that details the needed information to setup and use MQTT in the do-more BRX PLC.
This video details troubleshooting issues that might arise with Implementing MQTT with the Do-more BRX PLC.
Our FREE Practical Guide to Programmable Logic Controllers eBook: https://www.automationdirect.com/ebooks/plc-handbook
this video follows both the mqtt training video and the mqtt example video here we will discover what to do if your mqtt configuration is broken and how to use do-more logger to troubleshoot your mqtt application in a brx plc but now let's say i messed up in my configuration so let's go here and create one uh device configuration here let's say that i typed this guy in wrong maybe i put an extra cue in there so if i did that and i'm making these changes on the fly which normally i probably wouldn't do either so i'm writing that down to the plc but now watch what happens right here oh look see it failed and it's telling me era 63 has occurred and it's telling me that it happened with topic number one so i can go over here and i can see um what is zero 63 i'll show you in a second but here's the first topic that failed so it's the very first one what does 63 mean well i pull up system error message strings here i've got the system error and the system message strings you can see that the err says dns address not found and it tells me in mqtt there's a lot more here i can actually go see that here if i go to the warning you can see it's telling me dns server was unable to find address in mqtt pub and also knows my sub one is failing as well down here and you can see also it says 63 and the first one it saw was two in this case but here you can see that it's also failing with the same era they're both failing here and if i happen to click on go to it would actually go to that instruction so you can see as i click this it'll take you to the instruction that's failing that's what it would look like so let's go back and fix that i'll take my fat finger out and say okay and write that down the plc and there we go now all is well and again if i change the values here let's put in minus 1.7 or something it's being reflected down here so all is well and everything is working again okay but let's say that now there's some other failure or i can't get it to work for some other reason you know other than a configuration error there's a great tool that uh brxville sees having them we'll all do more plc's having them and it's called do-more logger it's a program that runs on the pc and you can make the do-more plc send messages to do to do more logger on the pc to help troubleshoot now to get it to do this it uses broadcast and to get it to do this we have to turn that ability on which is why i have this st36 up here this is a bit called enable message dump and that's what this is for for troubleshooting and also it's associated with this value dst 61 which is the system message level by default this is set to one and it means that when this is turned on then this one here means only send the system error messages to do more logger when i change this value to 2 then it means send the error message and the system message send both of these to the logger and when i have it set to zero then of course it won't it won't send anything so well the first thing i would do is i would turn that on and i would set this to 2 which is what i'm going to use now to start this off i'll go to the launch pad and i go here to the do-more logger program double-click start him up pull him over here and show you um by default it's set to all but you can see that some things are happening already it's getting messages you can see it there's a ping a ping request and a ping response and that's because none of these values are changing and so to make sure that keep keeps the connection alive keeps the mqtt connection alive then the bricks is before the 30 seconds is up that was set for my keep a live time he's sending pings to the broker to make sure he knows he's still there that's what we're seeing right here so we can also see if i'm going to let one more happen here and i'm going to clear it let's clear that out there we go clear that out and scoot him over here and then i want to go back to this and i'm going to turn this guy off turn this guy off all right and then i'm going to shrink this guy down a little bit so that i can bring two more logger over here clear all right so i'm going to initialize the values again just for fun and then i'm going to do the publish watch what happens here you can see these messages there that are being sent and being captured by do-more logger so here you can see that the first thing that happened was he looked up that dns or the url of my broker which is on the internet he looked that up and found it that's what that is so he queried the dns on our network and he found it then he connected to the broker the broker responded these are the connection and connection acknowledged and then there was uh the publishing of the two topics and since i've been sitting here talking he's had to ping him because of the keeper lifetime so also luke can clear this guy out and do the subscribe so you can see here he's sending a subscribe the subscribe was acknowledged he received publish for r100 and then he sent a subscribe for 101. he got the the recognition for that and also received that data and so also if i change this data up here and you can see when that happens that i got r 101 again and if i change this one you can see i got it i got r 100 so you can use do more logger in this fashion to help troubleshoot connections to your mqtt uh broker so i'll close him back down and always remember that once you use this method then you must also turn it back off because you don't want any unnecessary traffic and also set this back to the default and that's how easy it is to use mqtt on the brx plc and also how to troubleshoot you
Voted #1 mid-sized employer in Atlanta
Check out our
job openings