noorloai Posted December 30, 2015 Report Posted December 30, 2015 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
Crossbow Posted December 30, 2015 Report Posted December 30, 2015 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.
noorloai Posted January 2, 2016 Author Report Posted January 2, 2016 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.
Crossbow Posted January 4, 2016 Report Posted January 4, 2016 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.
noorloai Posted January 5, 2016 Author Report Posted January 5, 2016 Thanks Crossbow, really appreciated.
noorloai Posted January 5, 2016 Author Report Posted January 5, 2016 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.
Michael Walsh Posted January 5, 2016 Report Posted January 5, 2016 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: The global will automatically be created as shown below: Then just put your answer in Analog_Out_Value in your code.
noorloai Posted January 6, 2016 Author Report Posted January 6, 2016 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
Michael Walsh Posted January 6, 2016 Report Posted January 6, 2016 You would use the LREAL_TO_INT conversion function.
noorloai Posted January 6, 2016 Author Report Posted January 6, 2016 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.
Crossbow Posted January 7, 2016 Report Posted January 7, 2016 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.
noorloai Posted January 8, 2016 Author Report Posted January 8, 2016 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.
Crossbow Posted January 8, 2016 Report Posted January 8, 2016 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.
noorloai Posted January 8, 2016 Author Report Posted January 8, 2016 Yes you are right, I just checked it..so why i do not have this function the??
Michael Walsh Posted January 8, 2016 Report Posted January 8, 2016 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.
Crossbow Posted January 9, 2016 Report Posted January 9, 2016 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.
noorloai Posted January 9, 2016 Author Report Posted January 9, 2016 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
Crossbow Posted January 9, 2016 Report Posted January 9, 2016 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.
noorloai Posted January 11, 2016 Author Report Posted January 11, 2016 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
noorloai Posted January 11, 2016 Author Report Posted January 11, 2016 did i miss anything in the configuration of the module??
noorloai Posted January 13, 2016 Author Report Posted January 13, 2016 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now