Jump to content

Recommended Posts

Posted (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,

Error1.png

Error2.png

Edited by Red
Posted
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!

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...