MrPLC Member
  • Content count

  • Joined

  • Last visited

Community Reputation

3 Neutral

About BE

  • Rank

Profile Information

  • Country Australia
  1. I have not had your specific issue and by the sound of it you have done a pretty good job of trying to troubleshoot so far. The following points might help if you haven't tried them already: I assume this PLC is being connected direct to you PC. Have you manually set up the IP address etc on you PC? Is you colleague's PC running the same version of Windows as yours? Sometimes different version do different things (I have no idea why. That's above my pay grade ) This might not be possible, but are you able to connect the PLC to a router, connect your computer to that router and see if you can access it that way? (the router will need to be set up to use the relevant IP address range that the PLC is using). As you're using a laptop, is your WiFi turned off (airplane mode works well) when trying to connect to the PLC? I have had issues with this in the past. Can't think of anything else to try at the moment, best of luck 
  2. I created a function for this on my last project. It basically uses the method that @BobLfoot said, and also has an input so you can set how many decimal places you want. From memory, when looking at the output variable from this function, they still showed a heap of decimal places (ie. 123.45000000), but they were only ever trailing 0's. Personally, I needed it just to round off scaled temperatures & weights (which were on analogue inputs) to make my life a bit easier on the HMI side of things. I have attached the function below in case it might be of use. Trunc Real Decimals Function.smc2
  3. EtherCAT Issues

    I had a lot of EtherCAT issues on my last project, so played around with this a fair bit (ended up being a faulty EtherCAT hub and a fault VSD EtherCAT comms card). I found that if a cable is unplugged, all devices downstream of that cable disconnect (obviously), but everything upstream is fine. Plugging the cable back in resulted in the network reconnecting and working as intended. That said, I did have some code in place to automatically reset EtherCAT faults as the operators usually don't check such things, and if they do, the ring me for every little error . Without that code however, I can't recall if the EtherCAT automatically reset itself when an uplugged cable was reconnected. I can confirm that it definitely does not need a power cycle, but the error on the PLC might need to be reset/cleared (unless you code an automatic reset). Someone else might be able to confirm if the EtherCAT network resets itself without that code. As a side thought, the reason Omron say that could be (they might have other reasons too) is if you disconnect the slave from the network using sysmac studio or a button, no EtherCAT errors will be raised on the PLC. Basically, the device is still in the code and shown in the network topology, but the PLC no longer "looks for it" so to speak. I had to do this for one of my VSD's while waiting for a new comms card to arrive. However, my VSD was at the end of the network topology, and I don't know how downstream devices are handled if an upstream device is disconnected through Sysmac Studio (assuming the cables remain connected and the device is powered on).
  4. multifunction button NA5

    I am no expert on this, but if I had to create something like that, I would create an IAG for it along the following lines: Lamps: Create a bit lamp for each option. Set the OFF colour to be transparent, and the ON colour to whatever it needs to be Background: Create a shape the same size and shape as the lamps. It is to the the OFF colour. Manual Flashing: Create another the same size and shape as the lamps. It is to be the OFF colour and have 2 animations. 1 animation causes the shape to blink (with a transparent blink colour), the other triggers it's visibility. Both will use the "Manual Mode" bit as their trigger. Button: Create a button the same size and shape as the lamps. It is to be fully transparent. With all the above, you want to overlay everything in such a way that the Background is at the back, Lamps are next, Manual Flashing on top of the lamps, and Button on top of the whole thing. I haven't actually made what you are needing, so it might need some tweaking to get it right (kinda going off memory atm lol). The theory being that because all the lamps are transparent when off, any lamp can display. The manual mode is basically just a shape appearing over the buttons, and then blinking on/off with the same colour as the background, so it give the impression of a flashing lamp. And the button goes over the whole thing so it actually triggers when touching the lamp (I have lost count of how often I have inadvertently left the button under the lamp.........and then wondered why it wasn't working ) The variables can be set up to either be taken from a structure, individual booleans or a combination of both. The only catch with using an IAG, is should you use them in your HMI program, and then decide to adjust the IAG, the don't update in the HMI project. The new version needs to be imported into the HMI project, and then all the instances need to be manually replaced. Somewhat painful if you have a lot of instances. Moral of the story, get it right before using it lots 
  5. NA5 screen Crashes

    Sounds good. I had some weird problems come up on my last project due to task execution times being too low. Increasing the time solved my issues, but I didn't have anything like what you are dealing with. Good luck, let us all know how you go. 
  6. NA5 screen Crashes

    The only other thing I would try then is to merge some of your groups together. Maybe do a group "Robots 1-5" etc, and reduce the quantity of groups to about 10 (these 10 groups would include all your alarms). Try uploading these groups and see if you still have the problem. Basically, just trying to determine if it is the large amount of groups that are causing it, or if it is the amount of alarms.
  7. NA5 screen Crashes

    Thanks for confirming those points. One other thing, are you viewing the alarm history or just the active alarms when it crashes? Assuming you are view active alarms, does it crash if nothing is on the alarm screen? I personally can't see anything wrong with how you have set that up, that said I have never used unions for alarm expressions. I have used structures with no issues, so I would assume unions would be fine also, but I will leave that to someone with more experience to comment on.  If you haven't played around with the import/export function for user alarms, I would suggest having a play around with it before doing the following. I would hate to have to enter 800 alarms again . You can export all user alarms into one spread sheet, or do individual groups. Just right click the relevant group and click export to do individual groups. Or right click User Alarms and click export to export all the alarms into one spread sheet. At this point, my thoughts would be to export all your alarms to an excel sheet as I mentioned above. Then delete all the alarms on your HMI program, upload to the NA and see if you still have issue when on the alarm screen. If you still have the problem, then it probably isn't your alarms causing the issue. If you don't have any issues after deleting the alarms, I would be inclined to make a copy of your spread sheet. Then edit the copy, and remove about 80% of the alarms. Import the copy back into the HMI program, re-upload and see if the problem arises again. If all is well, keep adding alarms until the problem shows up again. If you exported all the groups individually, you could just import individual groups back in, instead of editing a large spreadsheet, this might make life easier. If the NA crashes basically as soon as you add some of the union alarms back in, remove them again and see if you can add some alarms in that reference non-union variables (probably just make some up from other booleans in the program), and see if you still have the problem. If the problem still happens with non-union alarms, then again, it's probably not your alarms causing the issue. I know its tedious, time consuming and painful, but basically if I was in your shoes I would be trying to determine the cause based on elimination, and then slowly re-introducing everything until the fault happens again.
  8. NA5 screen Crashes

    Just trying to understand how your system is setup, so bear with me. You have 42 alarm groups on an NA series HMI screen. You say each group varies in size, do you mean the quantity of alarms in each group (ie. 16 bit = 16 alarms)? Each group is 'triggered' by a binary bit. So does this mean that all the alarms in 1 group have a single bit that triggers all of them at once? Or each alarm has it's own trigger? You mention tags and tag array's in your first post, what do you mean by these? Is this like an array of bits for each group (ie. Array A-Bit 0 triggers Group A-Alarm 0, Array A-Bit 1 triggers Group A-Alarm 1 and so on), with you setting the values for these bits elsewhere in Sysmac Studio? Are you able to post a screenshot of one of the Alarm Groups in Sysmac Studio? Roughly how many alarms in total are you working with (easiest way to find this out is export them all to Excel. Right Click "User Alarms" and click export) A project I recently finished uses about 12 different alarm groups, with a combined total of over 250 alarms and I had no issues with it. I don't recall any delay's between screens either (except for the iPad's VNC connection to the HMI, but that is a different matter entirely )
  9. Sysmac Studio Improvement Request

    Not sure if this has been mentioned before, but it would be nice if we could assign a structure member to I/O in the I/O map. Currently it only allows "normal" variables, periods/fullstops are not allowed. The project I am working on has multiple structured datatypes for various equipment, and these structures include Boolean members that indicate the status of reed switches and other sensors (on physical inputs), and trigger run/start signals through physical outputs etc. So I basically have had to create individual variables for all my physical I/O, and then write the values from these variables to structure members (and vice versa for outputs) in an attempt to keep all the data for specific equipment together in the structure. Not hard to do using a few custom function blocks, but it just seems a little counterintuitive to create structures that keep things together and organised, and then have to create individual variables for physical I/O. I assume there is probably a reason Omron hasn't done this, but it would be nice if we could 
  10. I don't have any issues when on my workstation in the office. I do notice a difference when I am programming onsite with my laptop. Even then though, the programming itself is fine, it's only things like build/rebuilds, simulations etc that seem to take a bit longer to perform (or it might just be my perception ). That said, my workstation and laptop are higher end machines by most people's computing standards. Laptop is a lower end gaming laptop (can't recall specs off the top of my head, but it's one of the Asus Tuf Gaming series), and my workstation is designed for the 3D CAD work I typically do when I am not programming (Xeon CPU, 32GB RAM, PCIe SSD).
  11. For NA series HMI's, you can use a data display for this. Your expression (Properties - Behaviour) is the integer variable. The following settings are also under the "behaviour" section of the DataDisplay properties. DataType: Change this to Numeric (if it isn't set to that already) ValueFormat: Custom CustomDisplayFormat: Vessel Level: {0:##0.0} Meters Lets assume that the level in the vessel is 6.5 meters. The data display would display the following (minus the quotes) "Vessel Level: 6.5 Meters". It will show up like this in the simulator too, so if you can see how it will look on the HMI. Data Edit Objects work in the same way. The link below gives a bit more detail on how it works, specifically on the role of 0's and #'s in the CustomDisplayFormat:
  12. Sysmac Studio Improvement Request

    Ah, very possibly. It was probably one of those settings that my Omron tech suggested to change when I did their training course (and have since forgotten about it lol) If that is the case, the setting is located under Tools-Option...-Variables.
  13. Sysmac Studio Improvement Request

    What do you mean by variables don't behave well? If I update the name of a global variable in the global variables table, it automatically updates it in other areas of my program. However if I have 10 variables named Test1, Test2......Test9, Test10 and I wanted to change them to be 2-11 (instead of 1-10), I start by changing 10 to 11 and working my way back down to prevent any variables ever having the same name (which, rightfully so, causes Sysmac Studio to get a bit cranky and tell you off )
  14. I have been successfully using the following function block. Link below. There is a guide for using it in the ZIP file if I recall correctly, really easy to use and works well. In my case I have multiple instances of it, and with a little bit of code in place to prevent them all executing at once, they work great. I did the CONCAT for the filename in some inline structured text (I want a new file to be created every month), wrote the results of that CONCAT to a variable, which was then used as the file name variable in the function block. If the file with that name already exists, then it doesn't create a new file. Otherwise it creates a new file as per the file name variable. There is also a column names input, so the block will make the first row of the CSV file a set of column names when it creates a new file. Very handy . If you decide not to actually use the function block, you can still open it to see how it runs, which might help you to work out why your code isn't creating the CSV file too.
  15. is really plc runs in cycle?

    I don't know to be honest. Like I said, I don't have any experience with PLC servo programming so someone else will need to chime in. I suspect the problem is related to one of your other posts regarding Relative movement, so I would be taking what @scotty134 said in that other post and see what you come up with from that. It looks like the IF statement on line 7 is working, because line 8 is writing the value to IRAxis4_Pos2. And the PLC will be running that IF statement every time it does a cycle (which you said was set at 1ms).