AngryRobot

MrPLC Member
  • Content count

    70
  • Joined

  • Last visited

Community Reputation

2 Neutral

About AngryRobot

  • Rank
    Sparky

Profile Information

  • Country United States
  1. Accessing USB from VB on NA screen

    I might be able to do this by saving it to SD card in the PLC... more experimentation is needed.
  2. Does anyone know how you can access the USB drive from a VB script on an NA screen?  I need to run a script to create a CSV file, but I can't figure out how to direct it to the USB location.
  3. NA Broken Line Graph

    I ended up changing to a structure that contains an array for the captures and strings for a date and time stamp.  Then I created an array of these structures.  This lets me easily save the data, and move it into a "display" structure to show on the HMI.   But now I've also found out they want to be able to pull this data from the HMI.  So I've hit a wall again.  I tested with using a data group to log it to a CSV file, but that can only look at one element of the capture array in one element of the structure array at a time.  I don't see any way to have it log the entire structure at once.
  4. Cognex DataMan 262

    I'm not familiar with that Cognex scanner, but the I/O mapping looks pretty much identical to a DM60.  Here is a quick example project showing a structure and the variables to communicate to a DM60.  There is no actual programming in it, just the communication setup; but there really isn't much to programming for these things.  The data from the scanner comes in as a string, and then you turn on the acknowledge bit once you've moved the string into a permanent data area. Dataman Structure.pdf Cognex Example.smc2
  5. NA Broken Line Graph

    I'm not sure doing it by time stamp will work though.  I'm pretty sure that will continue to capture data between different parts as if they were still part of the same data grouping.  So all of the parts would blend together into one overall trend curve; but I need to be able to display the specific curve for each individual part. I think I came up with something that is going to work... but it wont be the most memory friendly solution.  I created a two-dimension array, the first dimension is the 50 parts I need to save data for and the second is a 16 element dimension that saves my capture points.  Then I use a WHILE statement to create a pseudo-stack and shift everything through it; then once its been shifted I move my just captured data into the very first dimension and element of the saved data array.   IF test3 = TRUE THEN     Pointer:=INT#49;         WHILE Pointer <>INT#0 DO         MemCopy(Save_Data[(Pointer-1),0], Save_Data[Pointer, 0], UINT#16);         Pointer:=(Pointer-INT#1);         END_WHILE;     MemCopy(Capture_Data[0], Save_Data[0,0], UINT#16);     test3:=FALSE; END_IF;            
  6. NA Broken Line Graph

    So I was finally able to grab a PLC and HMI off the floor to do some testing with.  It looks like the Broken Line graph will do what I need if I push everything into an array.   But in order to "save" the last 50 good graphs and the last 50 failures I am going to have to create 100 individual arrays to push the data into when it is no longer the "current' data.  That's going to be pretty messy.  Is there a way to create an array of arrays?  So I could just say push Current_Data_Array into Saved_Data[0].
  7. NA Screen Multi-Line Alarm Message

    If you use ALT+ENTER to add a second line to the fault message string then the alarms viewer will show both lines.  It won't auto wrap, but if you know a good breaking point for the message you can force a line break yourself.  I've attached a picture of a basic alarm display showing one of my fault messages that I inserted a line break into, and it displays both lines.
  8. NA Broken Line Graph

    Ok, here is another caveat: I will be evaluating this captured data to determine if the part is good or bad- and the customer wants to save the last 50 good "graphs" and the last 50 bad "graphs".  That is the exact wording used in the customer documentation, they want to "save the graph" so that they can look at them later on the HMI. So not only do I need to do a live graph of the torque curve as  the test is running, I need to log the data so that I can display the curve again at a later date.  I'm not sure how to use the Trend graph for that; because in my limited experience with that it pushed all of the data into one file, so I'm not sure how I would read out different "graphs" based on the user's selection.  
  9. NA Broken Line Graph

    I need to be able to graph an analog input value on the HMI during the course of a part test procedure.  Is the broken line graph the right tool for this?  I don't believe the graph works in the simulator (or does it?) and I don't have the PLC yet to experiment with it all.   Basically, I need to send an update command every 20ms and then graph the analog value at that time.
  10. Sysmac Studio Improvement Request

    Well, spank me and call me a moron.  I did not realize I could create new resource lists.
  11. Sysmac Studio Improvement Request

    I want the ability to create separate groups of strings- kind of like how alarm strings are kept separate from the general strings.  I use labels with dynamic text and the '"string_name" & variable' expression a lot.  I use it to display status messages, model type names, etc.  It would be really handy to be able to create separate groups for each of these string groupings, just to keep everything organized.
  12. Anyone have much experience creating IAGs?

    I think I came up with more crude solution, that I'm not as worried about zapping the HMI performance with. I created a variable in the HMI called CLOCK that maps to the 100ms clock pulse in the PLC.  Then inside of the IAG I set the expression that calls the sub to (Run AND Clock).  So now it only calls the Sub when the page is displayed, and the clock pulses.
  13. Anyone have much experience creating IAGs?

    Someone here at work suggest multi-threading as well, and they were also worried about the performance affect it might have on the HMI.   This will be going into an IAG object, so it isn't very easy to call subs from page displayed/hidden events.  Right now I set a BOOL variable when the page is displayed, and that is passed into the IAG and used as a conditional expression to call the sub, and then I reset the variable when the page is hidden.  So I think, using  your example, I could  create another variable that would be set when the page is hidden, and reset when the page is displayed, and then use that to call the end loop.
  14. Anyone have much experience creating IAGs?

    So part of the problem is my familiarity with ST versus VB.   I didn't think about the subs only running once when called.  So that is where most of my problem is.  I'm only running the sub once when I load the page, and never again to change the value of the label when the variable changes.   I have six servos on this machine, so six different IAGs or pages to display the faults and other info.  What is a good way to continuously call a sub, without sticking it in the global events table and calling all six all the time, even if the page the sub is on isn't being called?
  15. Anyone have much experience creating IAGs?

    Yeah, it seems I wasn't calling my sub like I thought I was.  I am now able to get it to run the sub; the sub just isn't doing what I want.  So now I've got some sort of issue interfacing the input variable to the VB code.