Sign in to follow this  
Followers 0
lamboom

D to A conversion from a function block

2 posts in this topic

Thanks to much help from the Forum, I have a G5 servo motor wiggling back an' forth randomly in rotary mode.           

                            MC_SymcMoveAbsolute.jpg.0f29539bce00eebf

 The position signal for that motion, is coming from the MC-SyncMoveAbsolute function block. (MC_Axis000)

  Is there a way to convert that signal to Analog , ideally +&- 10 VDC .. for analog output on I/O ?

Thanks, much,  Regards... Michael Lambert

Share this post


Link to post
Share on other sites

Absolutely.  Lets say you were taking the analog signal to an NX-DA2603 which is a -10 to plus 10 signal with a range from 0 - 7999.  I believe that this means that 0 = -10 VDC, 3999 = 0 VDC and 7999 = 10 VDC.  Lets also say that CSine ranges from -100 to +100.  Then, you would simply write a bit of structured text to convert the from one to the other using the old slope-intercept equation.  For my example, it would look like this:

oiSttgAAAABJRU5ErkJggg==

Then, simulating, I get the values that would be expected:

Rk5ynD9e3dkAAAAASUVORK5CYII=

fAwCAjtEtggT9vgP30UIAANARRP4f8YXYh2L12oc

PyZzPwBAIgjzPwBAIgrIv8PBJkgFo0nU5wAAAAAS

This could easily be turned into a function as well.  Of course you could calculate the slope and intercept using your calculator and then just put the constants in the structured text for each.

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