MrPLC Member
  • Content count

  • Joined

  • Last visited

Community Reputation

8 Neutral

About AngryRobot

  • Rank

Profile Information

  • Country United States
  1. Clear variables when program stopped?

    Local variables.  I have not tried it with the actual hardware yet, but in simulation mode they maintain their last state.   Edit: at least in the simulator, both local and global variables set in the stopped program retain their last state.
  2. If I use the PrgStop command to stop executing a program (say when a different model type or tooling fixture has been selected) is there a way to force the variables to clear?  By default they retain their last value.  
  3. Data from an NX102 to Excel

    Any tips on how to write data to the CSV file?  I have an array of REAL numbers.  I can create and close the file just fine, but the data that gets written is just junk characters.  Do I need to convert the data to string?   EDIT: Converting to string and concatenating a ',' worked.
  4. Data from an NX102 to Excel

    I've used the NJ models with SQL capabilities before, but this machine doesn't normally require data logging.  We are wanting to do an in-house run off on the machine and log some of the test results to prove its reputability when our customer shows up; and I figure logging it right from the PLC will be easier than sitting at the machine and manually recording every number by hand then transcribing it into Excel. So FTP it is.
  5. What is the best way to get data from an NX102 (or any NJ/NX PLC) into Excel?  I've been experimenting with some OPC UA options, but so far the only clients I've been able to connect with don't allow exporting of data.  Does Omron have any sort of ODBA connection?
  6. Thank you for the link.  The code that Chelton posted at the end of the thread did exactly what I needed! That is very similar to what I was going to try originally, but when setitem didn't popup as an option while I was typing I just assumed the HMI didn't support it.
  7. Is it possible to change the dropdown list text on the fly?  I would like to assign each of the options in the list to string variables that my users can change.  I have an array of strings that store the names of parts and I want those strings to show up as the labels in the dropdown. Is there a way to access the object properties in VB?
  8. I have finally gotten the chance to test this and I've got one issue.  I have no control over when the operator might disconnect the fixture cable.  I have it programmed with a "Remove Fixture" button that disables all of the enabled Ethercat nodes and prevents errors.  If the operator removes the cable before pressing the button though the disable function block will not disable the node, which leads to an EC error that can't be reset because an enabled device is disconnected. Does anyone know any tricks to force it disabled, even if the FB doesn't want to?
  9. Thanks.  I'm pretty sure use global comment is the default, so I don't know how/why I unchecked it.
  10. This seems like it should be very simple, so I'm sure I'm just overlooking something.  When I create a global variable, I can click in the corner of the comment box and open up all of the sub comments for an array or structure for quick mass editing.   While programming I added comments to array of bool coils as I went and they were saved as local comments and not the global comments.  I want to open up the local comment sub menu so that I can copy and past them all to the global comment list, but I can't figure out how to access it... or if its even possible. 
  11. I have a structure named "Tests" with three BOOL members (Active, Passed, Failed).  I have another structure called "All Tests" with 12 "Tests" members. Is there a way to look into the structure All Tests and determine if any of the ".Failed" members is active?  
  12. I just stumbled onto this today, and I wanted to throw this out there in case someone else finds it useful.  You can use the ArySearch function to determine if there are any active elements in a BOOL array by setting the Key to P_On (or any other active BOOL variable). I've been using a union of an LWORD and an array of 64 BOOL for faults/alarms and looking at the value of the union to be <> to 0 to indicate an alarm is active.  Well, I have a machine that is getting close to going past 64 alarms; so I set out to determine if there was anyway I could use a larger array.Do Note though that this only works if you need to know if an element is active, or how many elements are active; it won't translate to a BCD value the way a union will. 
  13. Thank you!  That is what I assumed, but I wanted to verify.
  14. If I set a variable as retained, but then also set the initial value, does it re-initialize the variable anytime the PLC loses power, or only on a program change?
  15. Thanks!  Looks like that is what I need.  Luckily I think we've been able to redesign the machine so that I won't have an individual device on each fixture now, so it has simplified things for me.