Red

Simple Question?

4 posts in this topic

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

Share this post


Link to post
Share on other sites

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 person likes this

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

DATA TYPE # VALUE

Int#1

REAL#3.14

This is the IEC standard designation for literals.

1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now