Jump to content

Flex727

MVP 2023
  • Posts

    3,275
  • Joined

  • Last visited

  • Days Won

    239

Posts posted by Flex727

  1. 3 hours ago, job517 said:

    It has to be REAL data type since the reading is of the form 12345,12.

    That is not true. It is best to use integers for this type of data. The HMI variables allow for an implied decimal. You simply set it up for the 2 decimal places you need and keep track of where the decimal point is if there are any subsequent calculations. In your example case, be sure you use a 32-bit integer, as the actual number in the register will be 1234512 which is too large for a 16-bit integer.

    Once you learn and understand using integers with implied decimals you will find that many arithmetic operations in your PLC software will be greatly improved.

    • Thanks 1
  2. It may be a hardware failure, in which case you may need to take action if it's still in warranty. If not, you may be able to get it repaired. Some members on this board do hardware repairs on their own out of warranty equipment.

    However, I would try a few software fixes first. One thing that seems to fix many strange problems is to download a BLANK program into the PLC, then perform Initialize & Reset. You might also try removing the battery (and power) and let it sit for 24 hours. If the program is burned in, then do the blank program download first.

  3. 23 minutes ago, John_R said:

    I follow Flex's advice of putting the different version Icons in a row, then moving the Swapper Icon under the currently registered version Icon, saves a lot of headaches....

    https://forum.unitronics.com/messenger/2013/

    I suspect no one else can access that link since it was a PM. Here is the screen cap from that message thread:

    image.png.4083d9e217b1f8ea05c5047bf9d665da.png

    You can also see that I have two copies of some of the versions. Whenever I need to have two instances of VisiLogic running (to compare projects, etc), I add a second copy.

  4. This module is somewhat unique in that the analog outputs have an option for +/- 10V instead of the normal 0-10V. The spec sheet says:

    Quote

    Resolution (except at 4-20mA)   12-bit (4096 units) + sign

    This is not clear to me. Does this mean that the operand should range from -4095 to +4095 to output -10V to +10V, or does it mean -2048 to +2047? I suspect the latter (I guess it could be -2047 to +2048).

    I guess there is one other possibility. It could be 0-4095 to cover the range -10V to +10V. In this case, the range I would be looking for with a 0-10V output would be 2048-4095?

    It would be really nice if Unitronics had spec sheets that were a little more clear. Especially in this case, as it would be important to know what value corresponds to 0V.

  5. 59 minutes ago, gazza29 said:

    my tank level is 21000 x 13% will give my tank contents so i need to convert that 13

    You need to convert a 13% tank level to gallons? One way is to multiply 21000 times 13, then divide by 100. That's the normal way percentages work.

    Another way would be to have a second linearization function that outputs gallons instead of percentage.

    1 hour ago, gazza29 said:

    also what am i going wrong with the timer below it wont energize

    Is your timer in a subroutine that is being called by the Main Routine? Edit: I see that it is in the Main Routine.

    It's not possible to see if you have the tag names correct (i.e. is the timer output bit the same tag that's energizing the coil). If that is all correct, do one or both of these:

    1) Place an INC function just after the Timer function and see that it actually increments. If not,

    2) Place a test bit in parallel with the Negative Transition contact in front of the Timer function and activate it manually while online.

    This should help point you to the problem.

  6. Good advice from @DanT. I would add that you don't necessarily need to download the example project into your Samba to learn from it. Open one of the example projects that you are trying to learn from, study that example (they usually have pretty good rung comments), then re-create your own program from scratch for downloading into your Samba. You will likely learn more by creating your own program than simply loading an example and playing with it.

  7. I see no picture attached. However, I think what VisiLogic does is omit zeroes in the OS version number so that what you actually have on the PLC is 4.004. If VisiLogic is asking you to upgrade the OS, then you must in order to download a new project.

    Be prepared for it to take several minutes. Also, I have had it fail on occasion, but just repeat the procedure and it will be fine the second time.

  8. 13 hours ago, Action22 said:

    The following net is giving me a 1012 - Illegal Net error

    Think about what ladder logic is all about. It's a high level language where each ladder rung is intended to encompass a single line of code. It's not just a blank slate with some random lines drawn. Separate lines of code belong in separate ladder rungs. You tried to put 4 lines of code in a single ladder rung. Sometimes you can get away with it, but it's fraught with risk and is very poor form.

    • Like 1
  9. 7 hours ago, Flex727 said:

    Search on MODBUS Slave Addresses. Click on MODBUS,IP, then Slave Addressing. There you'll find the addresses for the different operands in the PLC, including the addresses for the I/O.

    See above on where to find the info in the Help file. While you could certainly map the I/O directly to MBs in the program, it is not automatic. The Help file provides the addressing for the MODBUS Master to find the I/O coils. They would be addressed just like any other coils, just higher up in the address table.

    Being a MODBUS Slave is not sufficient to be able to read data from the PLC. You must have a SCAN_EX function block running in the program to scan for incoming MODBUS requests.

  10. The digital I/O on the expansion modules is numbered sequentially starting at I-32 for inputs and O-32 for Outputs.

    All the information you need to know is in the help file. Search on MODBUS Slave Addresses. Click on MODBUS,IP, then Slave Addressing. There you'll find the addresses for the different operands in the PLC, including the addresses for the I/O.

    You'll need access to the PLC program unless the program is already set up to be a MODBUS Slave.

×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.