kaare_t

MrPLC Member
  • Content count

    2126
  • Joined

  • Last visited

Community Reputation

120 Excellent

6 Followers

About kaare_t

  • Rank
    Propeller Head

Contact Methods

  • ICQ 0

Profile Information

  • Country Norway

Recent Profile Visitors

5806 profile views
  1. Using bytes (not words) with MOV

    You can use "MOD" instruction to check if it's dividable by 2: MOD D3012 K2 -> NE 0 -> "FlagIndicatingOdd" If you receive the flag, it indicates that you have an odd number, and you can remove the 8 bits and possibly generate a number of words increased by one (compared to the division by 2 earlier).
  2. Answered here: http://forums.mrplc.com/index.php?/topic/35099-modbus-address-register-exchange-between-melsec-q-series-plc-and-me96ssha-mb-power-meter/
  3. Does it matter since the gap is obviuously located between system setup range and measurement range? What I mean is that 754...763 is multiplier factors, model code and so on which obviously does not have anything to do with realtime measurement, while 768...788...xxx is the realtime measurement area where you want to do the high-speed calculation. So in other words, I would read-out 754...763 during startup of system, and then continously read 768...xxx for measurement purposes. Or am I missing something here?
  4. Accessing specific bits in a word.

    You are correct that "." are limited to specific addressing only. The way "around" it is to define variables in global lists and then use the variable name (you can assign a labelname the address D100.1 for example).
  5. Modbus TCP/IP iQ-R series

    As Gambit states, it's not possible to use ModbusTCP Server (slave) in the R-CPU as of now. But if you must have it the way you are describing it (Q = Client/Master and R = Server/Slave), then you have to add some components in order to communicate between them. I would do the following if you "must" do it your way: If you already purchased the R-CPU, then also order an Ethernet card RJ71EN71. Alternatively if you haven't purchased the CPU yet, just replace R04 with R04EN (which has 2 built-in extra Ethernet port that can be configured with CCLinkIE Field. Buy a Modbus Server (slave) <-> CCLinkIE Field gateway to convert between Modbus telegrams and CCLinkIE Field network; https://www.anybus.com/products/gateway-index/anybus-xgateway/detail/anybus-x-gateway-cc-link-ie-field-slave---modbus-tcp-server Hopefully you haven't purchased the CPU yet, since you can just select the R04EN CPU with 2 extra built-in Ethernet ports which can be configured as CCLinkIE Field ports (or regular Ethernet ports).
  6. Mitsubishi Servo(Current Data Problem)

    So you have not set ANY other parameters in the amplifier, and you're using DIO for positioning data, can you disconnect IO from the amplifier, and just use MR Configurator. Boot the amplifier and turn some revolutions, monitor the value, reboot the amplifier and see if the value is stored. This is normally very easy, just connect the battery and set parameter: Absolute positioning is working
  7. Mitsubishi Servo(Current Data Problem)

    We cannot see any picture(s)...
  8. Mitsubishi Servo(Current Data Problem)

    Which parameter(s) did you change, and to which value, to enable absolute positioning?
  9. FX5U EVAL instruction

    No problem, glad you got it working. As a side note: Something must be completely wrong with FW v1.046. The first thing I checked was if there was any changes for the EVAL regarding FW, but the manual states that all float instructions are available from the first FW version from Mitsu, so obviously something very strange going on with FW v1.046. Thank you for the update and solution!
  10. FX5U EVAL instruction

    I meant exactly what you are suggesting; FMOVP K0 D7900 K30... I looked through the manuals and I cannot find anything related to versioning regarding the EVAL instruction so basically you should be good to go. As mentioned, I don't have a FX5 where I am now, but if no one else can test it, I can get my hands on one this weekend I think. In the meantime, I noticed you are using double-quotes for the strings ("). Could you try using single-quotes (') instead? So instead of: $MOVP "123" D7900 use $MOVP '123' D7900 Also: Does the code run fine in simulation mode on your computer? Is it only after downloading to the PLC you are getting problems? Which version of GW3 are you running?
  11. FX5U EVAL instruction

    Are you sure you are clearing all the areas in the "from" field (D7900 ->)? And you are sure that nothing is overwriting anything in these areas? I don't have a CPU where I am now, but simulating it works fine. As a test, try to use pulse instructions only, to know that nothing is overwriting anything elsewhere (external comms?): FMOVP K0 D7900 K30 $MOVP "123" D7900 EVALP D7900 D7940 RST M721 Only run M721 and see. If it works doing the above, we know that something is modifying/adding data to D7900-D7929 somewhere causing the EVAL instruction to complain.
  12. Report Builder 3.0 with SQL Express/FTView SE

    OK, so I've been giving this some thought, and I must say I'm a bit in the dark exactly what you want to achieve by getting the data "inline" like you describe. Maybe you could also describe what your "final goal" is, just to make my understanding better, and to shed some light on possible routes? I mean; the output you are referring to in the pictures is just the raw output right? In your report application you can organize and adjust where you want the data placed? What I'm trying to point out is that I'm pretty sure you want to do the UI logic in the View application instead of in the SQL query? Anyway, I've created a query you can use for your question, but please post more information if you can and we'll try to help you accomplish your goal in the "correct way. See code below, works for MS SQL Express server. You can copy-paste this code into your SQL Management Studio to be able to run the query if you want to test (you might have to adjust the DB names etc). -- Creates a temporary timestamp value (and sets it to NULL in my test) -> Set it to the correct value in your application query DECLARE @stamp AS DateTime SET @stamp = NULL; -- Creates a temporary table that we will use to insert into - note that these are the columns you want DECLARE @tmpTable AS TABLE ( ValDateTime datetime, Val1 float, Val2 float, Val3 float, Val4 float, Val5 float, Str1 nvarchar(82), Str2 nvarchar(82), Str3 nvarchar(82) ) -- Inserts into the temporary table INSERT INTO @tmpTable(ValDateTime, Val1, Val2, Val3, Val4, Val5, Str1, Str2, Str3) VALUES ((SELECT TOP (1) DateAndTime FROM FloatTable WHERE DateAndTime LIKE @stamp), (SELECT Val FROM FloatTable WHERE TagIndex = 1 AND DateAndTime LIKE @stamp), (SELECT Val From FloatTable WHERE TagIndex = 2 AND DateAndTime LIKE @stamp), (SELECT Val From FloatTable WHERE TagIndex = 3 AND DateAndTime LIKE @stamp), (SELECT Val From FloatTable WHERE TagIndex = 4 AND DateAndTime LIKE @stamp), (SELECT Val From FloatTable WHERE TagIndex = 5 AND DateAndTime LIKE @stamp), (SELECT Val From StringTable WHERE TagIndex = 1 AND DateAndTime LIKE @stamp), (SELECT Val From StringTable WHERE TagIndex = 2 AND DateAndTime LIKE @stamp), (SELECT Val From StringTable WHERE TagIndex = 3 AND DateAndTime LIKE @stamp)) -- In the end, just use a SELECT * from the temp table to select all columns SELECT * FROM @tmpTable   Gives the following result (note that in my DB I only created the columns with NULL value in the datetime column. Top line is headers, and bottom line is data. ValDateTime Val1 Val2 Val3 Val4 Val5 Str1 Str2 Str3 NULL 1 2 3 4 5 String 1 String 2 String 3  
  13. Report Builder 3.0 with SQL Express/FTView SE

    Understood! I will get back to you but I need to do some investigation first... I'll let you know.
  14. Did fx3g 485bd supports modbus comn

    Oh, sorry about that. I now see what the topic starter meant. Thanks @Inntele
  15. program efficiency

    Probably because the compiler generates temp vars to map data. In other words, the compiler makes use of variables to compile the code into IL for execution. The FB can be with, or without macrocode which indicates if it is placed inline or as a "subroutine". It's hard to explain your exact issue without seeing the code with and without modifications.