You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old March 7th, 2018, 10:31 AM   #1
nmurray
Member
United States

nmurray is offline
 
Join Date: Apr 2014
Location: Indiana
Posts: 64
GP-Pro EX

I am at a loss on how to do this seemingly simple task.

I am trying to set a value to a Float Variable using a MOV statement.

S1 = 0.5 it changes this to 0r0.5
D1 = TestFloat (Variable I created to test this, it is of Type Float Variable)

I get this error:
3408 INIT:2 S1 The data type or attribute of the operand does not match other operands. Change the data type or attribute.

I have tried moving 0 or 1 to the TestFloat variable and still no luck, I'm not sure how GP-Pro wants me to type in a float value.
  Reply With Quote
Old March 7th, 2018, 10:42 AM   #2
Bullzi
Lifetime Supporting Member
United States

Bullzi is offline
 
Join Date: Jun 2012
Location: Colorado
Posts: 1,235
Quote:
I get this error:
3408 INIT:2 S1 The data type or attribute of the operand does not match other operands. Change the data type or attribute.
Based on this it looks like you are trying to move a float into a Integer register. Many devices wont let you do that.
__________________
There is never enough money to do it right but there is always enough money to do it again.
  Reply With Quote
Old March 7th, 2018, 10:43 AM   #3
nmurray
Member
United States

nmurray is offline
 
Join Date: Apr 2014
Location: Indiana
Posts: 64
ugh I think I solved my problem.. it must be 0f0.5

I thought I tried this earlier but apparently not.

However this brings up a different issue, how can I convert an input to a type of float?
I was hoping to move it to a float variable then scale it so I can get a decimal point.
Or will the input show a decimal point based on my scaling setting I setup for the input?
  Reply With Quote
Old March 7th, 2018, 11:20 AM   #4
nmurray
Member
United States

nmurray is offline
 
Join Date: Apr 2014
Location: Indiana
Posts: 64
Found it they have a Integer 2 Float instruction that I did not see.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
GP Pro EX 2.2 isteak007 LIVE PLC Questions And Answers 2 October 6th, 2017 07:25 AM
MISSING DEVICE in GP PRO EX V3.5 dR001 LIVE PLC Questions And Answers 0 April 12th, 2016 07:40 PM
GP PRO PBIII software jorge.ocampo LIVE PLC Questions And Answers 1 July 10th, 2015 06:06 PM
L5K file from RS5000 to GP Pro EX sjanes9 LIVE PLC Questions And Answers 5 January 23rd, 2015 03:54 AM
Is somebody (or his friends) skilled in programming with GP Pro EX software ? alex3110 LIVE PLC Questions And Answers 5 July 13th, 2014 09:25 AM


All times are GMT -5. The time now is 01:23 AM.


.