Red Posted September 28, 2023 Report Posted September 28, 2023 (edited) Hi all, I'm working on my migration from CJ series to Sysmac (NJ/NX). I've encountered something I think is a simple answer but I just can't find anything in the documentation or forums that has gave me a concrete answer. I want to increment a variable by one. Is it not possible to insert a raw integer into the value field of the function? (Please ignore the P_Off as this is only for test purposes only) I know I can create a variable and make it a constant of one but that just seems odd to have to go through that many steps to do so. EDIT: I should add the variable I'm trying to increment is a UINT (Unsigned Integer) The error I get is: Quote Error 1 Comparison, assignment, or operation is performed for different data types. Program0 Data Row 4 EDIT2: While I solved my problem with this instance by using the Increment function, my root question still remains. How do you supply a value of a number to a parameter of a function without creating a symbol for that parameter? Thank you all for your time, Edited September 28, 2023 by Red Quote
realisator Posted September 28, 2023 Report Posted September 28, 2023 Hi, In Sysmac Studio in Ladder You have to assign type in constant value ("Type#Value"). For example UINT#1 or DINT#2 etc. 1 Quote
Red Posted September 28, 2023 Author Report Posted September 28, 2023 1 minute ago, realisator said: Hi, In Sysmac Studio in Ladder You have to assign type in constant value ("Type#Value"). For example UINT#1 or DINT#2 etc. Ah! I see. I saw that listed in the manual but I didn't take it as literal. Thank you kindly for that clarification! Quote
Crossbow Posted September 29, 2023 Report Posted September 29, 2023 DATA TYPE # VALUE Int#1 REAL#3.14 This is the IEC standard designation for literals. 1 Quote
Recommended Posts
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.