Jump to content

s.pratt

Members
  • Posts

    350
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by s.pratt

  1. 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.
  2. Hello, The EX-RC1 does contain ladder logic elements, however it is very limited. The drum sequencer is not supported in the EX-RC1. More simplistic elements, such as math functions, storing, vector, and logic tools are supported, as well as communication for the serial port on the module (Modbus & FB Protocol). Hope this helps.
  3. Hello, Only if the Modscan software is acting as a SCADA system will you need to apply an offset. Coils & Discrete Inputs: 10,001 + Slave Address Input Registers: 30,001 + Slave Address Holding Registers: 40,001 + Slave Address Hope this helps.
  4. Hello, We have program examples of setting up Modbus Masters and Modbus Slaves in VisiLogic. You can find them through the Help tab. Depending on whether you are using Modbus RTU or Modbus TCP, the folder directories are a little different in the pop-up window that appears after selecting "Eamples..." under the Help tab. Modbus RTU: Version 900> Project Examples> Communications> MODBUS Modbus TCP: Version 900> Project Examples> Communications> Ethernet> Ethernet Modbus IP The files may not be made specifically for the V570, but if you enter into the Hardware Configuration and change the controller model, the application will change over. Also, we have tutorials on our website to help you create Modbus applications. Here is the tutorial on Modbus. Let us know if this helps.
  5. Hello, The "While Displayed" subroutine will "run first", and then the Main routine will run. In other words, the last statement seen before updating the HMI, comms, and outputs will be from the Main Routine. Hope this helps.
  6. Hello, The Main Routine will still run every cycle with the "While Displayed" routine. Hope this helps.
  7. Hello Shailesh, we have example programs that you can load from the help tab in VisiLogic. Depending on what type of Modbus communication you are using (serial or Ethernet) we have the according Modbus slave program. In this slave program, we just configure the port we will be communicating over, configure the Modbus protocol for that port, and then enable a "Modbus Scan" function block that will accept any Modbus commands directed to our slave ID. This is all that we will do for programming a Modbus slave device. Then, in your Modscan software, you should be able to access ML 7 at address 0x7007 (28,679) and ML 9 at address 0x7009 (28,681). Please let me know if this helps.
  8. Hello Shailesh, On a V570, you should be able to start read the ML integers at hex address 0x7000 (decimal address 28762). This is the address for ML0, and the rest of the ML address will increment by 1 respectively. For a full list of the slave addressing, please go to the help files via the help tab, then navigate as follows: Communications> Communication FBs> MODBUS> Slave Addressing file. The V570 uses the Enhanced Series slave address table. Is this the address you are currently reading? If not, how are you calling the MI and MB addresses?
  9. Hello, When you create the Clone file from within VisiLogic, you may assign a PLC Unique ID and a Password for this file (These options are only available when creating an application with OS or .cXX file). When the customer tries to open the file in VisiLogic, they will then be prompted for the ID and password if this information was included. Please let me know if this helps.
  10. Hello, What are you trying to name the file when you save it? Would you be able to share a picture of the error message you receive? Also, are you running the program as an administrator? Running as an administrator ensures our software can properly run with no restrictions, and can sometimes solve peculiar issues.
  11. Hello, Are you able to properly compile the code with no errors? Does this happen with other subroutines as well, or just one?
  12. Hello, Have you tried sequencing the sends?
  13. Hello, If you are using the Modbus periodic, you should be reading/writing to the registers defined in your program as soon as the device turns on, unless you have Active bits associated with the slave registers. If the Active bits were off, then you would not be reading/writing to the slave. In the struct, you will see the Slave ID go to 1 even though you set it up for Slave ID 255. This is because it is reading this information from the slave device. I noticed in your struct from the first screen shot you attached (I did not find your other screen shots) that the remote slave IP you are connected to is 3.232.235.781, but you are connecting through 192.168.1.5. Is this correct? In the ModScan64 software, are you also connecting to 192.168.1.5? Would it be possible to send this case into support@unitronics.com with your application for us to review attached and a spec sheet for the device you are connecting to?
  14. Hello, I do not see any attachments provided. However, since you are able to write to the device, it does not seem like an ID-ing issue. Do you have a spec sheet for the device, though? Are the Modbus addresses they list in hex? If you are able to write to output 1 (which I assume is address 1), then it will work fine. But if the addresses are in hex and you are entering in UniLogic to read address 10001 (which is decimal 65537) then this would explain why you are not seeing the address change with respect to digital input 1 on your device. Please let us know of your results.
  15. Hello, Try using a positive transition contact with the swap bytes function. Set up like shown below, the positive transition contact will be link to when you receive that float value. So when you receive the float value, it triggers the swap function block once (thus only switching the register bytes once, not every scan). Let me know if this helps.
  16. Hello, The Swap Single Tag Bytes tag will split the integer (16-bit or 32-bit) into two parts: two 8 bit parts for a 16-bit integer, or two 16-bit parts for a 32-bit integer. It will then switch the order of the parts, thus displaying a different number. For instance, if you read a 16-bit integer, but the bytes are backwards from what they should be, you can place this into the Swap Single Tag Bytes function, and choose the "Swap Type" in the B parameter. For a 16-bit integer, this is composed of two bytes, therefore the swap type will be AB_BA. For 32-bit integers, there a four bytes, and two different configurations can be chosen (ABCD_CDAB or ABCD_DCBA). So let's say I get a Hex value read in of 0x2301, but I was looking for a value of 0x0123. I would use this swap bytes function with a swap type of AB_BA, and the resultant of the tag would now read 0x0123. Please let me know if this helps or if I can clarify any further.
  17. Hello, I would check a couple things: First, I would check to see if this module is using an internal Modbus IP to Modbus RTU converter. If this is the case, you must choose the correct Slave ID to connect to the device. Very few devices have this, but it is a possibility. For Modbus IP, we usually set the Slave ID to 255. This may be affecting your connection as well. I would change the Slave ID by switching the Remote Slave connection point from a Modbus IP (Panel Ethernet) device over to a Modbus RTU (COM1) device, change the slave ID, then convert the master back to Modbus IP communication. Let me know if this helps.
  18. Hello, When you create a Remote Slave that you are going to connect to, a struct for the Modbus slave is created in the Global tags list. This struct is called "Remote Slave". Within this struct are tools for diagnostics. The session attempts are the amount of connects the PLC has made, and the successes or failures are based on the number of sessions attempts. If they match, there are no comm errors. The status in this struct will also give you an idea of how the connection is. Status '1': No errors Status '2': No connection has been made or established Status '3': Connection exists, but there is an issue with the Modbus commands being sent You will not have to set up any comm port initializations like in VisiLogic; it is all taken care of in the solution explorer set up. The only things you need to do is set up the panel Ethernet address on the same network of your slave and enter the slave IP address to connect to where you set up what you are reading from the slave (under the Modbus protocols tab). Please let me know if this helps.
  19. Hello, Only if you are on the same network, you can connect to the unit by typing the IP address of the unit. If you are outside the network, the only way I am aware of connecting to the unit is through a static IP address. You may contact your cellular provider, or internet provider, to acquire more information on how to do this or how to get a static IP address. Whoever is you internet provider may know of a better solution on how to connect to units on their modem.
  20. Would you be able to post your code or send it into support@unitronics.com for evaluation?
  21. What is the state of the Reset inputs? And what is the jumper for the digital inputs on the V120 (JP 1)? If the reset input is set to pnp and the input is receiving 24VDC, then the input is always being reset. This would be why the count remains at 0.
  22. Oh, I see. I apologize, I did not realize you referring to that function block. In UniLogic, we can create structs via the "Struct" tab at the bottom where the global variables and system tabs are found. This will create a "template" where you can associate large amounts of various data to one "file" name/type. Once the struct has been created, you can then make many different tags with the same data layout in the global variables section. When creating a new tag, select the "type" as the name of your struct, then memory space will be allocated for these tags. We commonly use the elevator example with this. For instance, if you have 4 elevators, all with the same amount of floors, sensors, and buttons; we would create a struct called "elevator", then add members (floor, sensor, button). When we create a new tag with this struct type (Elevator1), we will be able to call the floors as Elevator1.floor, the sensors as Elevator1.sensor, and so on. We can also add as many of these as we can fit (Elevator1, Elevator2, Elevator3, ..). Let us know if this helps.
×
×
  • Create New...