Search the Community

Showing results for tags 'real to dword'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Found 35 results

  1. Real world simulator

    When we simulate a plc program we have to manually input the changes in input(like magnetic reed switch) For example when a cylinder goes from up to down reed turn OFF and reed down turns ON Is there any program available where we can define such things that will turn on and off during the process automatically.
  2. I am not sure if anyone know any websites or sources ,to practice and program same as real projects. I have seen many websites but they are not realistic.
  3. 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
  4. Good Afternoon, I am wanting to do two things with and ORMON PLC and HMI with CX-Programmer and NB-Designer. 1. I want to display the current time from PLC on HMI with the real time clock. 2. I want to be able to enter a time on the HMI which will be compared to the PLC time and will stop a process when when the entered time is equal to the actual PLC time.  If I can have some help with this that would be a great help. Thanks,
  5. Now I working on omron CP1H PLC, i'm receiving ASCII number from another PLC which is something like this  "#3031 #3030 #3030 #3030" which mean 01000000. How to convert the ascii number to real number or bcd without separate them? I know how to convert them which is using HEX but its turn out the number will separate into this 0100  and 0000.
  6. 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?
  7. Using sysmac studio, i get 4bytes binary data Data[24], Data[25], Data[26], Data[27] like this, the problem is that the 4bytes data represent my float data what can i do with that 4bytes lol If u see below images you can understand my problem.... thank you all,
  8. I have a function that reads ASCII code from a transducer, converts the code into characters and places the characters from the serial buffer into a string. Now, I am trying to convert the value in the string into a 64-bit float number. Any ideas on how to do that on the CCW? 
  9. Structure Text REAL constant

    Hello. I'm having difficulties of how to write REAL constant in ST. For example (Gap1 is defined as REAL): Gap1:= UDINT_TO_REAL(P_Cycle_Time_Value) / +1000.0;     RETURNS ERROR ERROR:   Conversion cannot convert from Integer Literal to REAL I have also tried 1000.0 If I use:  Gap1:= UDINT_TO_REAL(P_Cycle_Time_Value) / INT_TO_REAL(1000);  COMPILES OK My question.. How do I write REAL constant in Structure text? I don't want to use  INT_TO_REAL anytime I want to do calculations with constants.. Thanks. BR.
  10. Real to 3 decimal points

    I'm fairly new to Mitsubishi and I am trying to limit the amount of decimal places of a real value down to 3. I am using a FX3U CPU and the only thing I see in the manual is that real values are stored with approximately 7 significant figures. Is there a way to limit the amount of figures after the decimal point to 3 without converting to an int value? Also does restricting the decimal to 3 points on GT works change to PLC value at all?
  11. 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.
  12. Please help me how develop totalizer for every 15 mins , for real value. Real value should   be taken sample  for 1Sec.
  13. 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);  
  14. 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?
  15. I am new at PLC programming, I have tried some ways to convert a text into DINT and I haven't found the right way yet, maybe somebody can help me. I want to convert "Hello" to DINT, for example. I tried converting it on here  https://www.branah.com/ascii-converter  to decimal and then using it as an input for a ROUND, FLOOR, TRUNC blocks to get a DINT, but when I get the result and use as an input in a DI_R i block the output doesn't match with the first conversion of "Hello". Any tips on how do I get it to work, please? Thanks in advance. 
  16. real to integer number

    Hello, Could somebody give for me advice how need seperate real number to integer? for example I have in D10 real number 10,9 for me need to do integer number 10 and 9. The real number seperate to integer I am using this LADDER line, attached picture. In D90 I got 10, But how to isolate the number of decimal places,I can not think of. Please help for me
  17. Convert time

    Hello. this is my firs post is possible to convert the elapsed time of timer to real or int i need to make some math operation with the elapsed time thanks  
  18. There have been many good discussions on the applicability of cloud-based solutions for manufacturing and process control systems. On one side, some people have concerns regarding security and control of the information, on the other side, there are identified benefits enabled by cloud systems. From VMS minicomputers to DOS and Windows, from ArcNet to Ethernet, it is inevitable the industrial automation systems shall adopt the technologies that are getting predominant in IT general use; the current environment that I am calling the “Cloud-iPad era” is no different; therefore the practical discussion is not if those new technologies will be applied in the industrial environment, but how. This paper is not intended to join the conceptual discussion about the cloud, but just to present a few simple practical examples, where cloud technologies are already enhancing industrial automation solutions and enabling new business opportunities. CloudPracticalApplications.pdf
  19. Hello - I am currently setting up a program to control a downlane conveyor motor and ran into the issue of operators leaving the conveyor on through their breaks/at the end of the shift.... I know, shocking . Anyways, the essentials of the program are the following - ladder logic, start/stop PB station, a sensor that says when I've seen a box for x-amount of time I will turn off, when the eye is clear for x-amount of time I will turn back on. When trying to 'solve the problem' of the operators leaving them on, I figured this would give me a chance to use a RTC (real time counter) and program it so that at various times of the day I will send a single shot to verify the relay is CT is open. I've enabled the RTC on the Micro810, dropped a TOW but do not really understand how to set the TOW block up. Hopefully that all makes sense. Thanks,  grubb
  20. 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?    
  21. Hello, I am having an issue with FIX Dynamics Real Time Database and the database columns available within when trying to query the database. On a system running iFIX 5.0, there are 19 data columns available, LHS of attached screenshot (in the screenshot example, crystal reports is used to view the columns). However in iFIX 5.9, only 15 columns are available (RHS of attached screenshot ), how can these missing columns be made available to be accessed? Regards, John
  22. Hello         I'm new for PLC, I need to set pump turn ON/OFF  in 4 time/day every day => [8:00-8:10]a.m, [11:00-11:20]a.m, [2:00-2:10-14:10[p.m, [5:00-5:20]p.m ** I have Omron PLC CP1E-N30 , Could you advise me, please ?  
  23. 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
  24. I want to do a calculation in the FX3u-48MT ESS and combine it with the input from HMI GOT1020. By the time i put input in the HMI with real number, and i calculate that with some equation just like in the manual as seen in the picture. I was confused when the result in the DINT is too many and in the pulse, it got minus, when it should be plus. Is there any way to fix this ? and how to round up the result correctly ? I really appreciate your help. Thanks in advance.  
  25. Tia Portal V14 Real time graph

    I current have 2 variable: Displacement vs Pressure. I need to draw a real time graph on Comfort Panel. The problem with using just f(x) trend is that the minimum time between updating a point is 0.5 sec and that is for ever in my application as the whole cycle last only 5 sec and I have to plot 500 points in that time. Is there a way to do real time graph using Historical data without any time delay. If anybody can guide me through any sample program or material would e helpful. Thanks