Jump to content

Recommended Posts

Posted (edited)

Hi Folks.....

In Maths instructions (divisor, multiplier word.....so on),  Is there any way to directly enter the Floating point no. without any register unlike Integers? Have to avoid entering any error value in the float register if PLC switch OFF for more than required time without battery.

Thanks

Edited by Abdul Wajid
Posted

Hello Abdul, I am not sure if this is working for you, anyway you may try to manually imput your FP data into a dummy integer usinf FIX or FIXL , after that you discard the dummy and keep your actual Data for FP math, it is not elegant but it works.  

immagine_2022-03-08_140606.png

immagine_2022-03-08_141645.png

Posted

Thanks Mr. Suresh for the info.... But it seems little bit different than sysmac studio which we can directly enter the floating no. by typing REAL#50.00 and so on.... in the function & FB.

 

Posted

I think I know where you are coming from. All numbers have to be converted to floating point before you can us them for floating point maths. Integers do not work. Use FLT or FLTL to do the conversion.

Posted (edited)
10 hours ago, BobB said:

I think I know where you are coming from. All numbers have to be converted to floating point before you can us them for floating point maths. Integers do not work. Use FLT or FLTL to do the conversion.

OMRON PLC ladder programming is quite loose about variable declaration, so you can take an integer, convert to FP and manipulate it as required letting the SW to manage the variable type behind the scenes.

SAMPLE02.jpg

Edited by suresh_
Posted (edited)

Thanks Mr. Chelton, that was my silly mistake which i wasn 't aware of.... 

2 hours ago, suresh_ said:

OMRON PLC ladder programming is quite loose about variable declaration, so you can take an integer, convert to FP and manipulate it as required letting the SW to manage the variable type behind the scenes.

This seems little bit complex, takes quite more time to understand & re-program for new omron programmer

Edited by Abdul Wajid
Posted

Dear Abdul, as chelton pointed out, you may input a FP value directly and consume it on the spot if the consumer function allows a FP because not all functions do. Otherwise, when you write a FP value into a register to be manipulated later on, you cannot simply use MOV because MOV is not meant for FP assignment, so you have to find some turnaround to do this as I showed before. Otherwise you need to use ASCII string to FP that can be very tricky indeed. Bottom line, since OMRON is loose about data type ( bcs they are very concerned about backward compatibility ), there is no need to stress too much about data type, simply enter a FP and let the SW do the work for you.

Posted (edited)

Dear Abdul, let me add another info for you. If you decide to use variables, you can use MOV to input a FP as you do for Integers. To do that you need to generate your Variable ( eg TEST) in the symbol section, specify REAL type and associate to a register (D100 eg). After that you can recall TEST variable in your ladder with MOV instruction and manually input your FP or associate it to an AI as you wish. In this way you can input your FP for later on use usingf MOV. According to PLC set up and register you selected ( HR, DR,..) , TEST variable may be or may be not saved once you switch OFF and ON your PLC. I hope this clarifies.  

immagine_2022-03-11_083704.png

MOV.jpg

S3.jpg

Edited by suresh_
  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...