Jump to content

linxchas

UniStream & UniLogic Beta
  • Posts

    70
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by linxchas

  1. I am agree about webinar. In addition to my previos post, there is a few important settings must be taken care of in system integers: Socket "X" TCP/IP Keep Alive (units of 100 msec) - corresponding SI103-SI106 should be set to at least for a 2 minutes. This is nessesary for downloads. Socket "X" TCP/IP Connection Keep (units of 100 msec) - corresponding SI107-SI110 should be set to at least for a 2 minutes as well. This will be nessesary in case if you lose connection while PLC in stop mode, so OS will reconnect controller to your Visilogic.
  2. I have not find a host name either, but i am using listen mode in Visilogic: In the plc program add attempt to "TCP connect" to designated port to you PC with Visilogic (PC should be on static IP, ideally public static) Execute it every 30-60 sec (less then 30 sec, not recommended because of TCP retry logic). Since Visilogic does not have multi-threaded TCP listener, Each PLC should have a unique destination port, so make a reference table between Unique PLC ID number (SDW9) or other device ID and Visilogic destination port. When you need connection to PLC, just activate visilogic listen mode and within 30 sec you'll have a connection established: I have 400+ DHCP controllers across US and as soon it plugged into the network i have an instant connection from Visilogic.
  3. Just a tip: Try to upload existing program If it not password protected, than you may find PLC name in the ladder logic
  4. here is an example to find address of 1sr non-zero integer in the vector MI100 [100] Setting MB 0 will return result into MI97
  5. Your shema should work. Seems to me it is a configuration issue. If you can post the code for PLC1 &PLC2, we can look with a "fresh" eyes.
  6. "... We are discussing this idea very seriously. I'm pretty sure we will do it, but don't know how much time ti will take." Just a point to consider: May be the way is to embed in the PLC a messaging client of Message-oriented middleware as FB, for example HornetQ? "HornetQ is an open source project to build a multi-protocol, embeddable, very high performance, clustered, asynchronous messaging system" This will give an easy way to connect controllers and PC applications anywhere in the world.
  7. Once, i was trying to do exactly the same and it did not worked. Seems to me, the OS refreshing display strings to linked operands once per second regardless of "refresh bit". That's mean the only way to make a grid is to allocate (in you case) 600 MI's or 300ML's for display variables. Use MI2010 [60] array as a buffer and use "copy vector with offset" for corresponding rows. You can do it easy in a loop, so all your grid will be refreshed instantly.
  8. Pooling NTP server every 5 sec is definitely too excessive and you are right about blacklisting clients for too frequent pings. Most of NTP clients offering intervals in the range from 1 hour to 1 week. Officially ntp.org says (http://support.ntp.org/bin/view/Support/SelectingOffsiteNTPServers): "... once you're up and running you should not be contacting your upstream servers any more than once every 1024 seconds (or so), and this shouldn't be a problem for the time servers to support." Regarding you second question: Yes, NTP servers are geographically related. If you want to avoid NTP addresses reference table for each PLC and reliable connection to your time source, try to use DNS resolver for NTP Pool servers: 0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org The resolved IP address use for RFC1305 FB "... The machines that are "in the pool" are part of the pool.ntp.org domain as well as of several sub-domains divided by geographical zone and are distributed to NTP clients via round robin DNS. Work is being done to make the geographic zone selection unnecessary" (wiki)
  9. Here, what I'd do in you application: In addition to Modbus channel described above, create notification channel using another socket in both master and slaves and UDP RAW protocol. In the slave program - create detector: "Data has changed". Each time detector raising resulting bit - send "request to call" (R2C) flag to the master with slave ID using notification channel. In the "MasterCall" table add column "Request to Call". Each received R2C place as a flag in that column to corresponding row. In the Modbus read logic add one condition - read slave only if R2C flag in "MasterCall" = 1 and reset flag after, otherwise go to next slave. Read all slaves once per 2-60 sec (depend of specific application requirements) anyway in order to check connectivity and compensate possible data collision in notification channel. This way you can significantly reduce traffic as well as reduce latency in delivering updated information. Master will scan your "MasterCall" table with resolution of PLC scan time and will call slaves only if they have a new data.
  10. No 3rd party controllers. Unitronics perfectly support ModBus over UDP. I am using it in many applications. Just initiate ports to UDP and skip "connect/disconnect" calls. ModBus has it own transactional logic and check sum, so there is no needs for TCP, especially in local network for master-slave type of communication. 60 reads per second - proven fact. It may be faster for small applications, because in LAN where round trip time less than 1ms, the main factor for speed is a scan time.
  11. If all of your V570's in one LAN, you can scan slaves with resolution of up to 60 per second using modbus over UDP. That's mean full survey of 15 controllers will take no more than 1/4 of second Here is logical steps: 1. Configure Modbus in the master as Follow: 2. Create "Master Call" data table: 3. Call next slave on some "start" condition and every time previous modbus session is completed (modbus "function in progress" = 0) 4. Prior to call "modbus read registers", load destination IP from "Master Call" table to Slave IP variable (in my example MI914) and increment index of slave to call. Reset index if greater than 15 This the most simple setup. Note, that Unitronics network card does not have an ARP buffer, so every time you call next slave, network card broadcasts ARP request. Running the master at maximum resolution will create significant load on the network. It's OK if network is dedicated to your application, In case if its a common corporate network, your network admin won't be happy from such traffic. This way you can set a delay timer between sessions and adjust the resolution to appropriate level.
  12. If all of your V570's in one LAN, you can scan slaves with resolution of up to 60 per second using modbus over UDP. That's mean full survey of 15 controllers will take no more than 1/4 of second Here is logical steps: 1. Configure Modbus in the master as Follow: 2. Create "Master Call" data table: 3. Call next slave on some "start" condition and every time previous modbus session completed (modbus "function in progress" = 0) 4. Prior to call "modbus read registers" load destination IP from "Master Call" table to Slave IP variable (in my example MI914) and increment index of slave to call. Reset index if greater than 15 This the most simple setup. Note, that Unitronics network card does not have an ARP buffer, so every time you call next slave, network card broadcasts ARP request. Running the master at maximum resolution will create significant load on the network. It's OK if network is dedicated to your application, In case if its a common corporate network, your network admin won't be happy from such traffic. This way you can set a delay timer between sessions and adjust the resolution to appropriate level.
  13. If the file that you downloaded has an extension .zip, just replace it to .vlp. Than you'll be able to open it in Visilogic This confusion may come from dropbox.
  14. Here is a document from Fluke networks with explanation how network link works: Fixing Ethernet and Fast Ethernet Link Problems One of the issues you may have - is recently (last 4 years) added feature to cysco and some other switches called: "Unidirectional Link Detection"
  15. OK, NMEA-350 (link from my dropbox) - is a sample code for your task. I did it in two steps: 1. split ASCII fields and place each value in "RMC Values" data table 2. Convert required field(s) from ASCII to Float. (in this sample only "Speed over ground in knots", but you can do same way any float field) Of course, there is a lot of room to optimize it. Adjust settings (COM1, ethernet) for your needs and let me know if it works
  16. Could you post few sample messages as you see it in hyper-terminal, I'll try to make a sample code.
  17. The answer is definitely yes. Tool should be used is "FB Protocol" The way how to do it depends from exact message structure. If the number of CSV fields is static, you can use parsing feature, build-in inside "FB Protocol". If the number of CSV fields is unpredictable, then you probably have to receive hole message (but no more than 512 bytes) as a stream and than parse it in a ladder code.
  18. It is not quite right to say that RS485 is limited to 32 nodes. The standard limits the number of nodes to 32 on one wire segment. If the network is extended by repeaters into multiple wire segments each segment can have up to 32 nodes. There is nothing said how many segments you can connect but of course there will be a practical limitation somewhere. Here is repeater we were using: http://rs485.com/pmhubx8.html
  19. Gary, Attach both projects to the topic. It is better to show write in the code.
  20. I would go with UDP_RAW. More control over the code, all straight forward.
  21. 1. About memory overflow: As I mentioned above, Max memory for all data tables is 122000 bytes. When you create a10x9999 table, by default visilogic sets columns as integers. So you’ll gettinga table of 10x 9999 integers =200000bytes. In order to stay within memory limiteither cut rows QTY to 6000 or set element type as "Byte" 2. For use it with SD card, you’ll need at least 2 tables – 1st asincoming queue, 2nd as outgoing for display. So calculate table’s sizes accordantly. SD data table utilities gives you a lot of options.
×
×
  • Create New...