Sign in to follow this  
Followers 0
noorloai

CJ1W-DA021 analog output configration required

22 posts in this topic

Hi,

I need your help/ suggestion to configure CJ1W-DA021 for 1 channel output connected to Digital Regulator using Sysmac studio. I have already added it to the CPU rack see the attachment.

how can I determine the appropriate analog out values to have the digital regulator deliver the correct pressure? how can I calculate the set value base on what?? I read the Manual but still stack, I do not understand how to calculate it to give me the desire digital output (pressure in PSI ) to my regulator 

This is the first time that i program analog out put therefore I need your advice/step to help me finish my project.

appreciate your response in advance.

Noor 

1.png

2.png

Share this post


Link to post
Share on other sites

Pretty clear from your picture, the analog output signal will be created by a numeric value in the configured range such as 0-4000 or 0-8000 depending on the configuration of the module.  I answered the rest on your other post yesterday.

Share this post


Link to post
Share on other sites

Hi Crossbow,

Thanks for your answers, I only do PLC Programming on and off and have never done programming analog stuff therefor I need a pointer in the right direction.

We have been asked to add digital air regulator to our xpleater machine. I am using sysmac studio with the CJ1WDA021 this module has 2points analog outputs to control the digital regulator measured pressure in psi.

Simply, PLC will calculate the necessary tension pressure. This will be the base multiplied by one of two constants. This pressure value will be converted to an appropriate analog output value which will be sent to the analog output module.

I have added the module to the cpu rack, and did the configuration as you suggested from the right side I used 1-5V (4-20mA) output signal range.

The set value is the number between 0-4000 BUT HOW CAN I FIGURE THIS NUMBER base on what?

Another question, how can I determine what the appropriate analog out values need to be to have the digital regulator deliver the correct pressure?

Thanks again for any support you can provide.

Share this post


Link to post
Share on other sites

It's s fixed scale.  You take your number and scale it to 0-4000 to get the desired output.  So based on a 1-5v signal, a value of 2000 will give 3v output.

 

0 is no output, 4000 is max output.

Share this post


Link to post
Share on other sites

Thanks Crossbow, really appreciated.

Share this post


Link to post
Share on other sites

Hi again,

Now my question is how can i send the scaled value to the output channel to give me the final output ?? 

I used this equation to scale my output values  A= U * 4094/(H-L) where  U : is the engineering unit, H (max range which in my case 100PSI) , L (min=0PSI).

and A: is the Analog out put value.

thanks again.

Share this post


Link to post
Share on other sites

When you have added the analog module to the project, it will show up in the I/O Map.  In the I/O Map, type in a name in the Variable field (same rules as other variables, no spaced, no odd characters) and it will automatically create a variable of type INT for you in the Global Variables..  Then do your math and put the answer in the variable that you mapped to the output of the analog module.   See below:

 

Type in the name here:

568c3933cd9e2_IOMap.thumb.jpg.edc8bd99ef

The global will automatically be created as shown below:

568c39334a4d3_Globalvariables.jpg.1f43c4

 

Then just put your answer in Analog_Out_Value in your code.

 

Share this post


Link to post
Share on other sites

Thanks Michael for your clarification, Actually I have already done this part, and I calculate my value using the above equation but the data type of my value is LREAL, and the out put channel data type is Int. question 1 is how can I get float value if its data type INT??

Thanks

Share this post


Link to post
Share on other sites

You would use the LREAL_TO_INT conversion function.

Share this post


Link to post
Share on other sites

I think my program is working, I will configure the module on Saturday and download the program to cpu and will keep you posted. hope everything will work fine.

many thanks to you guys (Crossbow & Michael) for your feed back. I am very happy to be member in this forum.

Thanks again for your support.

Share this post


Link to post
Share on other sites

As I mentioned earlier, you didn't need to come up with a scaling formula, there is a function called ScaleTrans in the NJ to do that for you.

Share this post


Link to post
Share on other sites

Yes you are right, I found it in help instruction, but unfortunately we are using Trial version 1.12, so it does not have this function. Thanks anyway for mentioning that.

Share this post


Link to post
Share on other sites

There is no way it does not.  It's been in the NJ CPU since version 1.05.  Trial version software does not limit the command set available for your programming.

Share this post


Link to post
Share on other sites

Yes you are right, I just checked it..so why i do not have this function the?? 

Search.png

scale Trans.png

Search.png

Analog Conversion Functions.png

Share this post


Link to post
Share on other sites

You cannot find it because you put a space in the search.  Try ScaleTrans with no space in between Scale and Trans.  If unsure of the exact name of a file, you could search for just a part of it.  You could have searched for Scale for instance.  One thing is for sure, no functions or function blocks have spaces in the name.

Share this post


Link to post
Share on other sites

What firmware version is your actual PLC?  And what firmware version did you select in the program?  This command was not in the original NJ processors, it was added in a later firmware.

Share this post


Link to post
Share on other sites

Hi Guys,

I downloaded the program to the cpu, but the regulator did not show me any changes its just read one value, while the output in the software change. I really do not know what is the problem?? did I miss anything in the configuration?? or its hardware error

5.png

Share this post


Link to post
Share on other sites

What do you mean it reads one value?  Did you put a voltmeter on the output and change the output variable value?

Also, your screen shot was taken OFFLINE, so you won't see any change.  Put the variable for your output (the same one you set in the I/O Map for the analog output) in a watch window and type new values into it.  Check the output with a volt meter.

You may also want to consider having your distributor who may be more familiar with analog signals come on site and assist, there's only so much we can do online.  I've connected analog outputs on an NJ and it took far less effort.

Share this post


Link to post
Share on other sites

I have already connected the voltmeter to the output channel of the module but its shows me 0 v on the channel. however i am sending values, which i can read it in the watch window 

Share this post


Link to post
Share on other sites

did i miss anything in the configuration of the module??

Share this post


Link to post
Share on other sites

Hi Guys,

Just wanted to update you, My program is working Now and I got the expected output signal. what I missed was activating the output.  Just turn ON the bit "Ch1_ConvCMD" and I got the signal. 

anyway, thanks a lot for your support.

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
Sign in to follow this  
Followers 0