Jump to content

Conversion from Long Int to Int


Shailesh

Recommended Posts

Hello Shailesh,

 

Is this question for the UniLogic or VisiLogic software? 

 

If you wish to change the type over in the VisiLogic software, you would have to delete the ML you wish to convert, then create a new MI operand.  There is no way to directly convert it over.

 

In the UniLogic software, you can easily convert the tag over by selecting the tag in the global tag list, then in the tag editor that pops up, change the "Type" of the tag from a 32-bit to 16-bit tag.

 

Please let me know if this helps or if I have misinterpreted your question.

Link to comment
Share on other sites

Hello Shailesh,

 

Is this question for the UniLogic or VisiLogic software? 

 

If you wish to change the type over in the VisiLogic software, you would have to delete the ML you wish to convert, then create a new MI operand.  There is no way to directly convert it over.

 

In the UniLogic software, you can easily convert the tag over by selecting the tag in the global tag list, then in the tag editor that pops up, change the "Type" of the tag from a 32-bit to 16-bit tag.

 

Please let me know if this helps or if I have misinterpreted your question.

Hello s.pratt,

 

          Thanks. I am working on Visilogic software.

 

          But I have Load controller in my configuration. (LC03). I am not able to assign MI variable in its hardware congifuration. It shows only ML tags. 

 

          What do I need to do to convert it? However hard it may be.. Just tell me.. I will do it.

 

 

Thanks,

Shailesh

   

Link to comment
Share on other sites

 

Hello Shailesh,

 

You must change the resolution over from "High" to "Low".  Then you will be able to link MIs to these registers.

 

 
 
Let me know if this helps.

 

Thanks.. It worked.. I will check Modbus address for corressponding registers.

 

One more query...

 

Can I make Array tag in this PLC. I want to do pointer logic ..  (like I used to do in Allen bradley / siemens)

For example : =  MI[MI100].. 

                           where MI varaible array is from 0 to 20..

 

 

Thanks,

Shailesh

Link to comment
Share on other sites

Hello Shailesh,

 

We do have the capability of creating vectors in VisiLogic, just select the starting operand a click the button with three green boxes and a downward arrow.  This will allow you to assign a description for however many MIs you would like in the vector.

 

5 21 2015 9 58 54 AM

 

Using the "Insert Number" Button will insert the according number for the vector for you.  (the above example will create "1 of 10", "2 of 10", "3 of 10", etc...) 

 

Please note, we also have our Vector tools to perform actions such as loading, storing, and filling vectors.

 

Hope this helps.

  • Upvote 1
Link to comment
Share on other sites

Hello Shailesh,

 

We do have the capability of creating vectors in VisiLogic, just select the starting operand a click the button with three green boxes and a downward arrow.  This will allow you to assign a description for however many MIs you would like in the vector.

 

 

 

Using the "Insert Number" Button will insert the according number for the vector for you.  (the above example will create "1 of 10", "2 of 10", "3 of 10", etc...) 

 

Please note, we also have our Vector tools to perform actions such as loading, storing, and filling vectors.

 

Hope this helps.

Thanks,

 

But wht abt indirect addressing?  Array function is useless until i use Indirect addressing in my logic.

 

Thanks,

Shailesh

Link to comment
Share on other sites

Hello Shailesh,

 

With the Vector function blocks, you will be able to point to that start of the vector, and you will also have to input an offset.  This is how you can indirectly address the vector.

 

Hope this helps.

Thanks, but I didn't understand that how to pointer the address  means I want to  make indirect address . suppose my address is MI 200 then  I want to use next 20 MI address for same interger for data logging .

so please can u give me example? ....  that how do such address ?

Link to comment
Share on other sites

Hello Shailesh,

 

I am not sure I understand your question.  Are you asking how to address MIs in the vector of MI200 - MI219?  For instance, how to address MI210?

It means , I want to make data logging , In that for 1 sec I want to move  20 Input value  in different 20 MI resistor for single analog input within 50ms of interval  . so suppose that analog input having address is MI 200 , So  I want use another 20  MI address for data logging . In that I want move reading one by one in 20 - MI address created by me  . It means that If MI 200 having value 1 so it will be move in 1st MI address out of 20, then after 50ms ,2nd value move into 2nd MI address..........and then up to 20 MI address .  So for that I want to make array in PLC logic as same as CCW . Can u give me that type of Example by using counter and timer .

Link to comment
Share on other sites

Hello Shailesh,

 

You can use a "Vector Store" function block with a 50ms timer to trigger the store.  I have created an example of this ladder below, and I also reset the offset to start writing to the top of the vector again when the vector has filled up.  The vector is contained in MI0 through MI19.  The offset is described by MI20.  And the input value we are storing is in MI50.

 

5 27 2015 9 50 30 AM

 
Let me know if this helps.
 
  • Upvote 1
Link to comment
Share on other sites

Hi,

 

I have the same problem with Unilogic.

 

I am working with PID and i want to store the Control Value which is INT32 into the analog output of UAN0402N which is INT16.

 

How should i do this?

Hello,

 

You may store the control value into the output using a store function block.  Just be sure your output limit does not exceed the limits of the INT16 output (-32,768 to 32,767).

 

Hope this helps.

Link to comment
Share on other sites

I don't know what was wrong!

 

I deleted the store block and added it again and now it displays all the variables inside the PIDCOnfig struct!

 

Thank you!

 

Just another question on this if you can help me.

 

I have the load input 0-30A (0-10V) on the UAN0402N 12-bit (0-8191)input port.

 

I linearise it 0-8191(0-10v) to 0-3000 and store it in the process value and the control value will have limits 0-16383 and directly stored on the UAN-0402N 14bit (0-16383) output port.

 

Is this a correct approach for PID control

Link to comment
Share on other sites

I don't know what was wrong!

 

I deleted the store block and added it again and now it displays all the variables inside the PIDCOnfig struct!

 

Thank you!

 

Just another question on this if you can help me.

 

I have the load input 0-30A (0-10V) on the UAN0402N 12-bit (0-8191)input port.

 

I linearise it 0-8191(0-10v) to 0-3000 and store it in the process value and the control value will have limits 0-16383 and directly stored on the UAN-0402N 14bit (0-16383) output port.

 

Is this a correct approach for PID control

Hello,

 

Seems correct to me.  As an added note: when configuring an input or output in the hardware configuration for UniLogic, the software will give you a "from" and "to" value.  This value can be anything you want, or the limits you are controlling/monitoring.  The software handles the linearization for you so you do not necessarily have to deal with the raw bit values of that input/output.

 

For example, if I am monitoring a distance (say 0-1000m) with a 0-10VDC signal, I could have my "from" value be 0 and my "to" value be 1000.  The software will automatically linearize the raw bit value to my "UIA-0402N_X.Input[input_X]" register in a meter format for me.  It works the same way for outputs too. 

 

Hope this helps.

Link to comment
Share on other sites

 

Hello Shailesh,

 

You can use a "Vector Store" function block with a 50ms timer to trigger the store.  I have created an example of this ladder below, and I also reset the offset to start writing to the top of the vector again when the vector has filled up.  The vector is contained in MI0 through MI19.  The offset is described by MI20.  And the input value we are storing is in MI50.

 

 
 
Let me know if this helps.

 

 

Thank u so much. This Logic is working.

Link to comment
Share on other sites

 

Hello Shailesh,

 

You can use a "Vector Store" function block with a 50ms timer to trigger the store.  I have created an example of this ladder below, and I also reset the offset to start writing to the top of the vector again when the vector has filled up.  The vector is contained in MI0 through MI19.  The offset is described by MI20.  And the input value we are storing is in MI50.

 

 
 
Let me know if this helps.

 

 

Thanks s.pratt, 

 

Its working..

 

:)

Link to comment
Share on other sites

Hello Shailesh,

 

If you wish to run this PLC as a Modbus Master, please remove nets 1 and 2 in your program.  These nets are making it a slave on the network as well.

 

The error status 55 does not exist.  A status of 5 explains there is no Modbus communication established, or it cannot fin the network to connect to.  Please ensure your wiring and communication parameters are all correct, and re-check the status you are receiving in MI 1000.

Link to comment
Share on other sites

Hello Shailesh,

 

If you wish to run this PLC as a Modbus Master, please remove nets 1 and 2 in your program.  These nets are making it a slave on the network as well.

 

The error status 55 does not exist.  A status of 5 explains there is no Modbus communication established, or it cannot fin the network to connect to.  Please ensure your wiring and communication parameters are all correct, and re-check the status you are receiving in MI 1000.

Does this mean that PLC cannot worked as a Modbus Slave and Modbus Master at a time ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...