Industrial Automation
Industrial Automation | Europe

myKnowledge

Main > Product Type > Automation Systems
Minimize Text   Default    Enlarge Text
 

Print
E-mail

Using STRING Data Type In NJ With NB HMI Text Input/display


Objectives
To Understand the interaction of NB HMI Text fields with Sysmac NJ STRING data type
Introduction

When using STRING Data Type on Sysmac NJ with HB HMI, please note the following restrictions:-

The NB ‘Text Display’ and ‘Text Input’ ‘parts’ enable a user to display and enter STRINGs.  However, the NB HMI will always pad any remaining characters with the space character (ASCII - 0x20, or 32 Decimal).

The Sysmac NJ terminates its strings with a NULL (ASCII 0x00) character.  This is the ‘c’ standard of termination for STRINGs.

The length of an NB String can only be defined as a number of words in length – meaning that the length of the data will always be an even number of characters.

If the Sysmac NJ variable  is made to exactly the same number of characters as the NB, then it will fail to read correctly in the NJ.  This is because there will be a runtime fault due to there being no NULL terminator.  Sysmac NJ must see a NULL to know where the STRING is terminated.  Therefore always define the STRING in the Sysmac NJ one byte longer than defined in the NB.

Content
Defining in NB
 
Declaration in Sysmac Studio:
Is one BYTE longer than that in the NB HMI. 
Summary
When using STRINGs/Text with NJ/NB, always make the NJ STRING at least one character longer than the NB definition.
For more detail 

See attached document. 



Attachments



Comments (View All Comments / Add Comment)

Related Articles
No related articles found.
Created 2014-11-18
Modified 2016-03-18
Views 3152

 

You are not logged in.