MrPLC Member
  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About henriks

  • Rank

Profile Information

  • Country Norway

Recent Profile Visitors

587 profile views
  1. Beijer IX T7B

    Greetings again! I never got to test this out with the PLC after you helped me with this scripting beacause I had to step in another part of the project for a couple of weeks. But Im now back working with the drawing page and tested it out- seems like nothing is happening... I have of course rewritten the code for my page name("Drawing_page") and button number("5") and also changed the drawing page down to 15x55 means 825 tags.. The PLC communicate now thorugh the MELSEC FX3U-ENET driver. Do you have any suggestions of what stopping this to work? I have attached my rewritten code. Thanks in advance! //--------------------------------------------------------------// Press F1 to get help about using script.// To access an object that is not located in the current class, start the call with Globals.// When using events and timers be cautious not to generate memoryleaks,// please see the help for more information.//---------------------------------------------------------------namespace Neo.ApplicationFramework.Generated{ using System.Windows.Forms; using System; using System.Drawing; using Neo.ApplicationFramework.Tools; using Neo.ApplicationFramework.Common.Graphics.Logic; using Neo.ApplicationFramework.Controls; using Neo.ApplicationFramework.Interfaces; using Neo.ApplicationFramework.Tools.OpcClient; public partial class Drawing_page { void Button5_Click(System.Object sender, System.EventArgs e) { //Starts the loop, starting with index=1, and runs 825 times for(int i = 1; i < 825; i++) { //Defines the internal variable name like "Tag1" in first loop, "Tag2" in second loop.... string internalVarName = "Tag" + i; //Defines the controller variable name like "TagM1" in first loop, "TagM2" in second loop.... string controllerVarName = "TagM" + i; //Gets the properties for each controller (inItem = internal, outItem = controller) var inItem = typeof(Tags).GetProperty(internalVarName); var outItem = typeof(Tags).GetProperty(controllerVarName); //Checks for null values (like missing correct variable name in previous statements) if (inItem != null && outItem != null) { //Gets the current internal value var valIn = (GlobalDataItem) inItem.GetValue(Globals.Tags, null); //Sets the controller value based on the internal value outItem.SetValue(Globals.Tags, valIn, null); } } } }}Best regards Henrik
  2. ix Developer - setBit scripting

    Greetings! Im trying to script a "MouseEnter" to setbit when enterring a circle dynamic. I have now 15 circle dynamics who I want to place all as bits in an Int16 memory. I have made an example, but I think I'm missing something important since it wont work. See attachement for code example. In the example, tag name is V_1 (int16). Thanks in advance for support. Best Regards Henrik
  3. Memory M8011 - 5ms possible?

    Thanks for the answer. Will look closer on the 1ms timer. I'm using the FX3U and working with 110 valves. Point is to make a "picture" in the "waterfall", so in need for quick pulsing to the valves.
  4. Memory M8011 - 5ms possible?

    Greetings! I just have one question. Is it possible to get pulse time down to 5ms? I have only been using down to 10ms so far. Im using the M8011 timer memory. Thanks in advance! Best Regards Henrik.
  5. Beijer IX T7B

    Thnx a million. Might have some questions later on, but I will try to make this work. This has been great help. Thanks again
  6. Beijer IX T7B

    It lags much less than by use of M's at least... Sure do, been investigating for that myself, but gets a bit hard when my C# skill is not "top notch".
  7. Beijer IX T7B

    Havent used internal tags. All the tags where set to M's . The M`s are now removed and only tag name remains. If you could help with the script, I would realy aprecciate it.
  8. Beijer IX T7B

    Thanks for the reply. The internal tags are working. But I have wery litle experience with C#script, but i will try to figure it out.
  9. Beijer IX T7B

    I have 55x30 pixel, dynamic circles black and white. The point of all this is to manipulate the valves in a waterfall fountain so that the drawn picture is visualized in the waterfall.
  10. Beijer IX T7B

    I have connected a Beijer IX T7B to the PLC. in order to use it as a drawing screen. (see picture). I have devided the screen into pixels. I have tryed to tag each pixel wit a memory thets part of an array in the PLC program. Dynamicly moving the values from the screen to the PLC, make the whole system lagg. Is there an easyer way to do this. I want to try to set all the pixels in an array in the Beijer screen, and then move the whole array to the PLC. annyone know howe to do this, or maby another way that may work? Sincerely Henrik Sorhaug
  11. Counter to slow

    I have set the counter to count pulses from the internal clock M8011. This is suposed to be a 100 hz clock pulse. The problem is that the counter isn't even counting 10 pulses a second. What to do to make the count faster? Can the reason be that I'm not using a PLC, but only simulating the program.
  12. Capture.PNG shows my structured data block. As shown in Capture2.PNG, I'm trying to write to a specefied element in the data block. X and Y are variables. My thought is to write to line number 'Y' in the data block, and to element numbre 'X' in this line. The main problem is to select the right line. I can choose "Pixels.line_1[x]" or "Pixels.line_2[x]" aso, but how do I set the line selection as a variable?