Hi there mate Most PLC's have a very similar concept with AI/AO - have you used any other software before? I have not used a Wago before myself, but I assume the concept would very much be: 1. Add the analog in & out cards to your hardware config. 2. Setup the raw input scaling on the hardware (eg. 4 - 20mA = 4000 - 20000) 3. Use a built in or homemade scaling block to scale your input as needed (eg. 4000 - 20000 = -100 - 2000kPa. 4. Write code as required 5. Scale output as needed (eg. 0 - 100%...
Yeah that is odd - sometimes you have to do what you have to do unfortunately. Have you tried sending consecutive bits in the word instead - ie. instead of [0].0. [1].0, [2].0 etc, send [0].0,[0].1, [0].2 etc. ?
If I am understanding what you are saying, then yes that would be your problem. I would create an array of bools on the client side for the transfer and try that. Or if client can't be changed then use words on server and unpack. But I am not sure if you or I are mis interpreting but it sounds a bit jumbled. I don't know what you have control of, but, if you are turning on BITS in the server, you should write to BITS in the client with a Function 15. If you are writing to WORDS in the server, you...
If I am understanding what you are saying, then yes that would be your problem. I would create an array of bools on the client side for the transfer and then unpack to words if necessary and try that. Or if client can't be changed then write words as Function 16 on server. But I am not sure if you or I are mis interpreting but it sounds a bit jumbled. I don't know what you have control of, but, if you are turning on BITS in the client, you should write to BITS in the server with a Function 15. If...
If I am understanding what you are saying, then yes that would be your problem. I would create an array of bools on the client side for the transfer and then unpack to words if necessary and try that. Or if client can't be changed then write words as Function 16 on server. But I am not sure if you or I are mis interpreting but it sounds a bit jumbled. I don't know what you have control of, but, if you are turning on BITS in the client, you should write to BITS in the server with a Function 15. If...
When you say it does not work, does nothing happen or do you get an error? I have not used this function in codesys but from my past experience with Modbus I believe the coils need to be contiguous, which may be why yours is failing? Have you tried using Write Registers (16) to do the job? Or is their data in-between you do not want to edit in the transaction?
Tough to know exactly what you are asking for here. Can you give a more thorough explanation and/or provide snips?
the alarm font settings are found in the alarm class setup
the alarm font settings are found in the alarm class setup
It appears you have some incorrect syntax. Are you able to post a snip of the code where the error occurs?
Hey mate, did you get to the bottom of this? If not, have you double checked the buttons are linked to the correct variables and/or performing the correct action? Have you tried always enabling the block to confirm false is moved to the variable if so?
Are you trying to handle your own password? There is a built in Visu user management option, this allows you to add access/visibility to a button. See snips. If you are wanting to handle it yourself, you can open a visu via code with the VisuElems.CurrentVisu parameter (needs to be turned on from Visualisation Manager) or open a dialog using the FbOpenDialog from the VisuUtils Library.
As far as I am aware, it does not. Is it a problem to only display fixed asterisks? If you are looking at it to display the number of asterisks = characters entered, I believe you will need to use code to determine length of string entered and use this to display the correct number. There would be several ways to achieve this. I also believe the above (code to detect string length) would be the solution for the second question, I do no think there is a built in string length monitor, only the default...
Hi macros, I don't understand the purpose of this. A Boolean only has 2 options, why would you not use a button? A combo box seems like a huge complication to a simple solution. There may be some convoluted way to do it but the integer in the combo box variable is Read/Write, so converting either way as you tried would not work. Regards
Hi Guru's, Could you guys possibly send a sample code or some snips to help with this? I am either barking up the wrong tree expecting a different result here or I am missing something that this simple mind can't work out, but I cannot get this to work at all. Everything you have shown and all else I believe is needed is there, but changing dates/times changes nothing...
I don't have software old enough to open this but, I guess I am confused.... Can't you just copy-paste the button?????
I gotta be honest, this one is a bit strange! With the exact same setup mine works. The only thing I could say is I see in your offline GVL snip there are the time filter variables and on the alarm table config you haven't showed those settings - you haven't accidently doubled up with both?
Not sure why those images didn't come through, I'll attach them to this post.
You can imbed the placeholder into the text list. Create a text list with placeholders for the DEVICE. In a text field set this up as your text list, use your appropriate index and then just type the name of the device (or whatever that happens to be) in the Text Variable field. And then you can copy-paste it as many times as you want and just change the device name. Resize the image and play with the font settings however you please. Is that the solution you are looking for?
Hello again, Could you send screenshots of the alarm group and the settings on the alarm visu through? Hard to say what is wrong if we cannot see.
No problem. I had a quick look at one of my programs and there are some actions inherent to some code I have brought in for email etc. It appears to me they are all called from within the FB or POU that they are used in, not outside as you have displayed in your snip. I see you have called it directly after the FB, so can you not call it directly at the bottom from within the FB instead? I believe usually you could call the action from somewhere else, but as you mentioned yourself it does not pass...
Understood, you could always make a frame. I'm not sure what this type of thing would be referred to in HMI SW but it is basically like making your own button, with placeholders for the tags. So you create the frame (which is just a visualization) and then insert it in each place you want it and populate the tags.
Couldn't you just put a label above the text list?
Hey pal, Any reason you choose an action & not a method? I have not used actions myself, but if it handle like an FB I believe it wants the IN_OUT to be nested in the calls brackets. ( EG. fbHomeSystems.ACTInit(stKineDataRef:=stKineDataRef); ) You could try doubling up (being an in_out, I think it won't matter), or you could try only referencing it in the direct action rather than the call above, unless of course it is needed elsewhere in the FB. Let us know how that pans out. Cheers, Ben
I haven't used this tbh I thought someone else might chime in by now haha! Are you sure you are supposed to be using an array of bytes? I see in the instance for Host name they are using a type String64. https://content.helpme-codesys.com/en/libs/EtherNetIP%20Services/4.3.0.0/EtherNetIPServices/Function-Blocks/DataExchange/Get_Attribute_Single.html Are you sure you shouldn't be obtaining a string value and converting to an array of bytes if that is what you need?
I haven't used this tbh I thought someone else might chime in by now haha! Are you sure you are supposed to be sing an array of bytes? I see in the instance for Host name they are using a type String64. https://content.helpme-codesys.com/en/libs/EtherNetIP%20Services/4.3.0.0/EtherNetIPServices/Function-Blocks/DataExchange/Get_Attribute_Single.html Are you sure you shouldn't be obtaining a string value and converting to an array of bytes if that is what you need?
G'day tvm. Not that I am aware of, I mean, I have had my fair share of crashes haha! I think I have seen this one when I was testing some other type of code before but this is the only consistent fault I have, it definitely only seems to happen when looking through trends. I looked into a similar idea but I don't know if it is the type of processor I have, the size of the existing project already or perhaps even the way I was trying do it, but I just didn't have anywhere near enough room to store...
It looks as though you are not receiving the data, as the ReceivedDataSize is 0... Have you set the wAttribute input? Sorry if you have, I can't see it there.
What about in the dropdown Project > User Managment > Permissions, it appears you can perhaps set View permissions there?
It sounds like you are right, if the CurrentVisu's are coming through it has to be cycling correctly! The code def looks right. I believe it was one on a PC and the other was on a Schneider HMI, so Vijeo Runtime?
I'm not sure I understand - the acquired values are stored in whichever variable you write them into...?
Sorry, so in your original post, is it correct that the 3 stCurrentVisu[x]'s are 3 different pages being accessed on 3 different PC's (or HMI's)? I have used this similar function before on 2 devices and it worked, I would have to locate where though....
I haven't done it myself, but Access Control from Properties on the sections you want to Lock?
Hey pal. I think it is working - I believe your use of INT's is causing it to 0 out when you divide with the Max_Input, and therefore the result of 0 is in fact correct. Convert to REAL's before you do the math instead of after and see if that fixes the issue.
From Schneider: We have feedback from R&D that this issue has already been reported globally and they are working on resolving it. It should be fixed with the integration of CoDeSys V3.5.SP19 in Machine Expert V2.2 planned for December 2023. This is the reference number for the fix/change request. PEP1059101R: JMT-M262-AUS-Processor Load Watchdog when loading trend in WebVisu In order to avoid the crash, we would recommend to load a small quantity of data in the trend. Maybe only 15 min and 1 min....
It turns out to be an issue with the DI card, removing this resolves all issues, adding it to the end of the rack makes it the only one not working. We tried replacing with another we had but same issue. We have used these in the past so maybe something with new firmware? Luckily we can get away without the inputs for the time being, waiting on Schneiders feedback now. Thanks
Oh god, I hope someone has had this issue before because it is doing my head in! I am trying to add a 3rd Bus Coupler (TM3BCEIP) to an existing M262 (TM262L10MESE8T) installation. I have installed these before and never had an issue. The problem is, there are no errors at all (on Bus Coupler Web Interface & in PLC) and communication actually seems great! But most of the IO will not update. When I say most, literally the only thing that IS working is the Digital Outs. The Digital In's, Analog Outs...
Wow, looks like you've had a lot of experience dealing with these kinds of things! I believe the HMI's are the latest firmware, but I do not have one on hand to check. I'm quite certain I remember needing to upgrade them towards the beginning of the project for something though. I will confirm. Hmm the M35, well I don't need motion so that seems a little overkill but it is interesting to know.... Perhaps it is something I can share with Schneider if needed, perhaps there are differences they will...
Hi tvm, I appreciate your help, once again. (Sorry for the late reply, Codesys Forge was down for a few days?) It did seem to me like some kind of file accessing issue... That sucks though, as I guess for now I just need to remove the trends because the plant that it is running can't afford to stop as it may not be noticed and has the potential to destroy a lot of monies worth of product. I was talking to the client about getting another PLC so that we could split the process & the visu/file handling,...
Oh my, I think I may have resolved the issue. I thought the Certificate had to be trusted, but that is just the default setting. You can change the stCredentialsSendEmail.i_stTlsSettings.etCertVerifyMode to AllCertificates. Now I deleted all my certificates and tried an email, the smtp.gmail cert comes into the quarantine folder but the PLC sends the email anyway. This works for me as I see no security risk. However, for anyone who needs trusted certs (although I did not attempt to install the code...
On a Schneider M262, when monitoring CPU load with SchedGetProcessorLoad, it seems to run at around 25-45% during most tasks, occasionally jumping up to about 60% with some visualizations when loading. I have some very small trends that I am only storing about 7 days data on, but multiple times now when viewing trends my PLC has gone into a Processor Load Watchdog fault. Sometimes it works no drama, running back to the start of the 7 days, changing span, etc. Then sometimes, like just now, all I...
Thanks for your reply tvm. Hmm, that is not ideal - did you have something you used as a workaround at all? Another email server that works perhaps? I did make an attempt at outlook too but could not get it to work, I did not commit as much time to it though. It sounds as though I could be one step closer if I read correctly though. I can get more than 1 email working, in fact I can get quite a few. It lasted about a week and sent probably 10+ emails before it failed, and that is when I discovered...
No ideas on this one ? π
Hello, I hope someone can help me. I currently have a Schneider M262 emailing out alarms & reports. When an email is ready to send, I first use a TCPUDP.DNS_Client block to obtain an IP from Gmail. I then run an SE_Email.FB_SendEmail block to send an email using the obtained IP to send the email. This all works well. The problem I am having is with the Gmail certificate. At some point the emails fail and when I go online I see it is because of an untrusted certificate. See in the attachment, I now...
Count := 0; FOR i:=(First element of array eg.0) TO (Last element of array eg.10) DO IF String[i] = '' THEN Count := Count; ELSE Count := Count + 1; END_IF; END_FOR; This will add 1 to the 'Count' in each instance that the String has any value other than NULL in it.
Could you elaborate? Is this a trend? You want a tooltip that tells you date/time & variable value at the mark? Thanks
Could you share the code that is performing the operation? Thanks
I also would love a solution to this. The date range picker is ugly! It would be great to be able to input a date range through a text field instead.
OK so that confirms that it works on your hardware, so something must be conflicting. If you are happy to send the project, then I am happy to take a look π
Ah OK, apologies, I misunderstood... Perhaps it is an issue with the application? Could you post some code or snips? I tried it on my own system (different hardware) and it works perfectly....
Ugh, sorry about the no subject π
Hi all, I have a Schneider M262, I am getting this warning which is bugging me! I wonder if anyone is experienced or knows how to get rid of it. See attached jpg. These values are the only RPI's I can find at all. But for some reason the warning is telling me it is 10ms. I'm confused!!!
What exactly is the issue? 16:15 is a perfect example of the representation of 4:15pm with %t[HH:mm] formatting.
Thank you so much timvh, you have helped me a lot!
You sir, are a guru. Thank you!!!
Hello, I am running this code to grab text from an Alarm Config Text List so that I can send the same text in an Email: (Program) AlarmID := GetText(sID := GVL.sAlarmID, sTextList := TextList); AlarmMessage := VisuElems.cmpDynamictext.DynamicTextGetDefaultText(ADR(TextList), ADR(GVL.sAlarmID))^; (Function) GetText := VisuElems.CmpDynamicText.DynamicTextGetText(pstTextList:=ADR(sTextList),pstTextIndex:=ADR(sID))^; My problem is that it seems sometimes (and only sometimes) I end up with a watchdog...
I see I have posted twice there but I cannot find a way to delete the second post, can anyone advise?
Hello pal! This block worked great, it appears to grab an IP no issues... However π For some reason this IP won't work? I have used DNS Server IP 8.8.8.8 and Domain Name smtp.gmail.com. It returns an address, usually appearing to be 172.x.x.x. If I try to run the email using this address it fails "Cannot connect to server". If I run a ping from my PC's cmd I get an address more like 142.x.x.x. I manually change the IP variable I am using for the email to this and try again and it works without a...
Hello my fast replying friend, Thank you so much for the answer! That block looks perfect, I will try it out and let everyone know!!!
Hello everyone! First post, very new to Codesys. My background is an electrician and a PLC programmer. I am currently using a Schneider M262 PLC on Machine Expert software, which is built on Codesys. Firstly, I am very new to this - Codesys is like a leap from easy PLC coding to much more in-depth (and smart people) computer coding, in my opinion! Anyhoo, I am enjoying it and learning quite a bit, but I bring you a problem today that I hope you can help with! I have recently worked out how to send...
Hello everyone! First post, very new to Codesys. My background is an electrician and a PLC programmer. I am currently using a Schneider M262 PLC on Machine Expert software, which is built on Codesys. Firstly, I am very new to this - Codesys is like a leap from easy PLC coding to much more in-depth (and smart people) computer coding, in my opinion! Anyhoo, I am enjoying it and learning quite a bit, but I bring you a problem today that I hope you can help with! I have recently worked out how to send...