tashinz

MrPLC Member
  • Content count

    394
  • Joined

  • Last visited

Everything posted by tashinz

  1. List and Display String problem

    hmm, it should be working. It's not working in simulation or on the real hardware? Also check out if the list is scrolled down so you can't see the first line.
  2. Invalid array index

    indeed, an array of strings is not possible. regards
  3. Invalid array index

    It works in simulator. And as I can see, now you can use FOR to address a structure variable array, not a member of a structure variable (now you don't need to parse all members to assign values). I've created a simple program (not a FB) in ST: FOR index := 0 TO 4 DO temp_1 := test_1[index]; END_FOR; where temp_1 and test_1 are structure variables. in this example, temp_1 members get values from members of test_1[4], (it works in simulator). regards
  4. Invalid array index

    Well, Gama_Temporary and Gama_Memory are identical structures. you need only one structure of a kind and then create variables memory and temporary that are types of that structure of yours. then try to simply assign one variable to another, e.g. temporary := memory; I didn't test, I can only see that no error is reported on compiling. the question is if all the data from the structure variable memory is transferred to a temporary structure variable. you should test this.
  5. Invalid array index

    Yes, if you use constant instead of symbol index, it will work. If you search cx-programmer help for struct key word you'll get a topic named Structure Symbols, and there you will find the following: Subscripts of Array Data Structures The subscripts must be constants. Symbols, addresses, and formulas cannot be used. I think this is referring to your problem. regards
  6. Yeah Crossbow, I totally agree, but sometimes you need to save program resources in which case one would use same fb instance wherever it is possible. regards to all
  7. If you reuse the values from function block then you should use new instance for every call (that would be e.g. if timer is used inside the block, if the same instance is called twice timer would not work properly, if it is called only once, which is the case when you use multiple instances, timer would work correctly), and if you do not (e.g. if you just have output = input * 23) you can use the same instance in every call.
  8. maybe something like this: let suppose you have an array of boolean with 50 members, i.e. booleanArray[50]. create internal variable index (INT) and output variable myOutput (INT). Then the code would be: FOR index := 0 TO 49 DO IF booleanArray[index] = TRUE THEN myOutput := index; END_IF; END_FOR; this would work only if you have one member of array to be TRUE, otherwise it would output the index of the last member which is TRUE. If i understood correctly your problem... regards
  9. CX-supervisor runtime invalid

    try Project -> Run? If still not working, try to right click some .SR2 type of file (this cx-s runtime file extension), choose open with (if no such option right click the file holding shift key) and the from the opened window find cx-supervisor runtime application, select it and check the option something like allways use this application etc. regards
  10. Address in CP1L W201.[W202]

    syntax is correct. it offsets bit from w200.00 for a number in w202 e.g. if W202 = 6, the w200.6 would be set ON if conditions on the left TRUE. not sure if it's working on simulation though.
  11. Omron Cqm1 Compile-Subroutine Error

    there is a RET(93) instruction missing in a subroutine 39. you add rung before SBN(92) 41 (that is rung 104 in Section 6) with RET(93) instruction, compile and there is no errors. also, I couldn't open the project as it's called (probable there is non-ASCII chars) so I've renamed it and then I could open it. regards
  12. Omron PNT21 profinet with Siemens ET200SP

    Well, this is the deal. ET200SP makes a difference between base modules (one to which you plug the IO modules and to which you can wire) as light and dark base units. I've taken into account that from the beggining since I put light base unit on the first place and other 5 dark units to the right of it. And when you do that in TIA Portal software (when configuring hardware) it is automatically done in project. But not i CX-Configurator. After I've found the parameter for each module that specifies whether the base unit is dark or light, and i specified the first base unit is light and others dark, everything works. By default, this paremeter is set to dark base unit. I hope this can help someone with similar problems. regards
  13. I have a following config: CJ2M-CPU33 with profinet IO controller CJ1W-PNT21 module. Remote IO is Siemens ET200SP with several DI, DQ and AI modules. I've downloaded the latest GSDML file for ET200SP, installed in CX-ConfiguratorFDT. I've configured everything and downloaded it, but there is no IO data exchange. According to LEDs on PNT21 it tries to establish IO exchange but on ET200SP ER led is blinking red, diag LED on first module is ON (green) and diag on other modules are flashing green. the config is ok, I've checked it several times. one might know that in ET200SP IO modules are inserted in base units which can be light and dark. the first module is allways plugged into light base module (which have to be wired to 24VDC source) and the rest (5 IO modules in my case) are plugged into dark base units (they are getting power from the unit on the left). Now, after all desperation, I've plugged out the first module (while power on) after which LEDs on PNT21 were ON (MS NS COMM and 100M) which means IO data exchange is established, and Diag on modules stopped flashing and turned ON, but ER on ET200SP was still blinking red. Then I plugged in the first module, ER is gone, all modules Diag are green, PNT21 LEDs are still ON and IO data exchange is performing which I've checked directly in PLC memory after wiring 24VDC to digital input. When PLC is sent to program mode or turned off, then back to RUN/Monitor or turned on, the errors are again present and there is no IO data exchange. if first module is taken out, then taken back, problem is solved, IO data exchange works. just to mention, in cx-config IO device error is reported as unknown error check for software updates. Has anyone dealt with similar configuration? with siemens et200sp? maybe someone has a workaround for this? thanx.
  14. ConfiguratorFDT

    you cannot scan the profinet network connected to the Ethernet port of plc. you have to connect your pc to the profinet network e.g. connect pc to switch, pnt21 (as part of plc) to switch and profinet distributed IO to the switch. then press scan (if I recall correctly) in cx-fdt and you'll get all your profinet devices on the list so you can configure them (give them names and addresses). regards
  15. NQ5-SQ000-B

    on toolbar you have advance bit button. click it and place it on the screen. on the right side you have properties of this object you just created (if not, click on it). one is Tasks, click on it, window touch screen tasks list opens. on the left side select task turn bit ON, below that select tag (bit you want to set). on the right side, Press Tasks radio button should be selected. then click add button. then select radio button Released Tasks, and on the left side select Turn Bit OFF task and bellow find the same tag you used in previous step to set ON. then click Add. after this you will have one task in Press Tasks (saying Turn Bit YourTag ON) and one task in Released Tasks (saying Turn Bit YourTag OFF). regards.
  16. CJ1M+ETN + Two NB7W Display

    Try this maybe: http://www.myomron.com/index.php?action=kb&article=1554 in this example the cp1 is used but the same should be for cj1. regards
  17. NQ5-SQ000-B

    Use Advanced Bit Button and Select Task Turn Bit ON for Press Task and Turn Bit OFF for Released Task. For both tasks select the same bit of course.
  18. Problem with GenerateReport

    Don't use fixed path for destination of the report (like "c:\reports\machine1\report1.csv") but use text point which you can fill with characters freely, or you can use combination of text point and fixed part like MyTextPoint + "MyReport.csv". All this in GenerateReport command. or you can do what you did, and the use CopyFile command to copy your report to another or same folder but with different name.
  19. CJ1-ETN21

    here is the link: http://www.myomron.com/index.php?action=kb&article=1254 regards
  20. CJ1-ETN21

    Not sure, but you shoud try to access the ETN21 using internet explorer. As i remember, there you can set up almost every parameter as in cx-programmer, and then you should restart only ETN21 unit. check the manual for accessing the unit using IE (or any browser). regards
  21. You don't need Omron opc server since you have a mitshubishi plc. you need Mitsubishi opc server or like you have chosen Kepware opc server which has a driver for many plcs including Mitsubishi. so, on this window you should select kepware opc as you did. What is the problem now? I've selected Omron opc since It is only opc server installed on my machine...
  22. After selecting a CX OPC Communication Control a windows opens: in a Server Name combo box select kepware opc server which should be installed on your computer (Here is Omron OPC selecte). Create a project by clickin new and give it a name. then, press OPC Groups / Items tab, you get: right click on left pane and add a group, and then right click on right pane and click Add Item (s) after which a window OPC Workspace browser opens with tags defined in Kepware OPC project (Omron OPC here), which you can then select and add them to the CX-Supervisor OPC project. Point is added: Press OK you get: where cx-supervisor tag called ujgh gets a value from opc tag New Point 1 (defined in Kepware project and which reads live data from PLC). in point editor it will be shown as: OK?
  23. Indeed good idea with kepware. create tags in kepware project. it's opc server and here you create all tags you need to monitor from scada. in cx-supervisor: go to point editor, add point, type a name, select a point type (Boolean, integer ...), I/O type would be input (if you monitor only) and I/O attributes would be OPC/Other, press Setup, dialogue opens, for server click an arrow then add and from list of available controls choose CX OPC Communication Control after which a property window is open where you should see kepware opc server on the list of server names. Create new project file (a file where cx-supervisor saves settings for opc this is not kepware project). then you should go to the OPC Groups / Items tab of the same window, create a group and add tags from the opc server. the rest is history...
  24. My guess is only using mitsubishi's OPC server. Do you have it? CX-Supervisor has only drivers for Omron devices, but it's opc client. regards