Search the Community

Showing results for tags 'dword'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Found 8 results

  1. FX5U Shift Dword

    I read the max value from a encoder SD4502. In the label I have sign the SD4502 as double word. If the trigger ( X10) is high then the value is counting in SD4502.  If the trigger flange is going down I puls with DHCMOV the value from SD4502 to D0. Now I will storage this data like shifting but it is only working on 16 bit. Is any one that can help how I can solved for 32 bit? I have tryit with commando sfr, SFL or BSFR,BSFL and also SHR_E. measuring on belt.gx3
  2. Hi, I am trying to convert a variable of REAL data type to DWORD. I 've tried using Real_To_Dword function which works fine if the real number is integer but when the real is decimal the function rounds the decimal number to INT first (I ve also read it in the instruction manual so no surprise here). I 've also tried experimenting with the function CopyRealToDWORD but again the outcome was not what I expected. Is there another way to convert decimal real numbers to DWORD without losing the decimal portion?
  3. CONVERT CTUD TO DWORD

    Hello i have some problem, i am noobs with the mitshubishi plc, i need convert the output value from a ctud to a DWORD, i use word_to_dword to convert, but when i compile it have a errror. Type mismatch on output variable, i add screenshot.
  4. I'm working on simple structured text program which takes in DWORD values, does some math on them and then outputs in DWORD type. What data type should I be using and how can I make this work?  This is one of the lines from the code(everything DWORD) and I get 'operator not supported by DWORD data type' XPos3 := XPos1 + (2*XIncrement);  
  5. Hello, CJ2M CPU-32 to IAI motion controller through ethernet/ip I'm working on programming electric actuators to pick up parts from a tray. I will have x (row) and y (column) coordinates that I need to update to move the actuators. So to go through the whole tray I would have to use nested loops. (below what i'm trying to achieve if i was doing it in C++)                                           6 Rows and 6 Columns, palettizing                                           data rows&columns DWORD (Row1,row2,row3...row6; col1,col2...col6)                                           c++ code                                           for i=0,i++,i<6;                                               rowData = row                                               for i=0,i++,i<6;                                                   colData = col                                                   execute movement                                                   wait for confirmation                                               end                                           end I have a way of doing it but it will require a lot of repetitive lines and typing every step, and I was wondering if there is a way on every iteration to increment the data location instead of the contents. In the picture below you can see the example where the goal is to copy data from D8100 to D8000, then in next step from D8102 to D8000, then from D8104 to D8000 and so on. So far in the documentation I was only able to find how to increment contents. Is it even possible to do what I want to?
  6. I am having problem converting a DWORD variable to a floating point decimal.  I've tried using the DWORD_TO_REAL function. Having the hex value "41E9B814" as an input I was expecting to get "29.2148819" as an output. However, I'm getting "1.110194.." as the output. Any ideas?    
  7. Greetings, so i create project for FX3U in GX Works2. In my program i use function in ST. That function return array with word(signed). I have a warning: ST FOR i_var := 0 TO n_i BY 1 DO TempNumbs := Numbs; TempDevSetsOnPerTime := DevSetsOnPerTime; QueueBySetOn[i_var] := 0; END_FOR; QueueBySetOn[1] := TempNumbs[n_i]; QueueBySetOn[3] := 1; FOR i_var := 0 TO n_i BY 1 DO IF (TempDevSetsOnPerTime[TempNumbs[i_var]] < MaxSetsOnPerTime) THEN QueueBySetOn[0] := TempNumbs[i_var]; QueueBySetOn[3] := 0; EXIT; END_IF; END_FOR; So, it realy funny, GXW cant return int? QueueBySetOn.gxw
  8. Dear all, I try to program function block. I have two WORD 402309 and 402310 in Hex the value is 410 for the first and 2A7A for the second. I need to read the value as a DWORD 4102A7A. Do there is DWord to DINT function block in concept 2.6? Do there is a way to convert the value easily? Regards.