Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About amirm

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. How did I miss that?? I sent info to client, I´ll wait for his feedback. Thank you ver much!
  2. A customer complained that his V350 stopped responding to his SMS commands. He says he was getting a code 4 in MI "SMS status message" (of SMS configuration FB) Code 4: (Scan only)The SMS message received does not exist in the SMS configuration He removed the SIM card from enfora modem, inserted on a cell phone and noticed there were several SMS spam messages. He cleared them all, reinserted the SIM and system returned to normal operation. Is there a way to force an "erase all messages"? Is there any other explanation for what happened? Too many messages in SIM card? Thanks Amir
  3. Thanks, Eyal. About Nyquist, I might be wrong, but I just want to count how many pulses I have over some time. If I cared about aliasing, having the exact frequency, or be able to reproduce the signal, then I´d need a sample rate at least twice the signal frequency. Unfortunately, 10mS response time for digital input makes it impractical. The solution: use relays to multiplex the high-speed inputs. As stated before, I just need to read flow. I can sample flow every 2 minutes, and it changes very little over time. Thank you very much!
  4. I have an application that requires 6 encoder inputs, all of them are 1 channel (1 signal output, not quadrature encoder). Maximum pulse rate is 460Hz, let´s make it 500Hz At this rate, I have a square wave that is 1mS high and 1mS low. On my tests, a V350 can run at 1400 scans/second, which is barely enough to see a high input level on a PLC scan, and a low input level on the next scan. Is there any hardware limitation to keep me from doing this? A low-pass filter? Software debounce? These encoders will be used to measure flow, but not total volume. In other words, I can miss a pulse once in a while, or make CLP run faster by not calling subroutines that are not important during flow measurement, which will take 100mS or 200mS, once or twice a second. After I measure the flow, I call these subroutines again (linearization, table write, SD write, Modbus scan, etc.) Thanks
  5. Ok. My customer is saying that when he connects the V100-17-PB1 card (profibus) in his V130-33-T2, the screens goes black and CLP does not work. When he removes the card, things get back to normal. I have already upgraded the CLP firmware to latest version with Visilogic 9.7.9. I did not test it connected to serial, to see if I can operands, etc. The program is using SB141 to call ethernet routines only if ethernet card is present. It is also checking a configuration bit to call (or not) COM2 init, but flag is cleared (no COM2 installed) The program has no Profibus init routine at all. I even checked for other O/S files, but I only have "VCO00300906_V130.UOS" in my "C:\Program Files (x86)\Unitronics\Unitronics VisiLogic_979_1\Data\Os\Vision Enhanced\V130\OS" directory. Is there anything else to be done? The "www.unitronics.com/docs/v130/v100-17-pb1_tech-spec_06-11.pdf?sfvrsn=2" does not mention any additional setting.. Thanks Amir
  6. Thanks, Alexander. Before I post the question, I looked the help entry for the "Profibus Configuration" block, and it does not show the SB2 contact. I found it strange and decided to ask the forum. Today I updated the firmware of a V350, and Visilogic 9.7.9 prompted me if "will I use a Profibus card or not". I also updated the firmware of a V130, but it didn´t ask me about the Profibus card. The idea is to have an "auto configurable" CLP, which detects what card is present (with SB141 and SB178) and call the right initialization / protocol scan routines. As I just saw, for V350 it is required to load the proper firmware - with Profibus card or not - so it´s not so "auto configurable" as I would like.. Thanks!
  7. I am studying UniVision Licensing with webinar from youtube. Very good... I noticed that subroutines can be password protected, but screens cannot. In my humble opinion this is not secure, because other people can look at the screen objects, discover the address of variables, and then read or write values. Tables are also not password protected, so a developer cannot create a table with secret data, or write-protect against tweaking. It is not usefull to put a password, because anyone can call a screen or read a table with unprotected subroutines. Here is a suggestion, if you take the time. Allow the screens, tables, trends to be password protected, just like subroutines - can only view and edit in Visilogic after entering the password. Protected screens, tables, trends cannot be called by unprotected subroutines, or Links & Jumps of other screens. Any attempt will either fail or generate compilation error. When the program enters a protected subroutine it sets an internal "protection bit" (not an MB!!) When the program exits a protected subroutine, it clears the "protection bit". When a protected object is called, it first checks the "protection bit" - "Am I being called by a protected subroutine?" - Act or Fail. Actually it is a bit more complicated than that. A CALL will push the return address on the stack, and POP it when it finds a RET. So when a CALL happens, the "protection bit" must be pushed on a separate stack and be updated according to the subroutine being called - protected or unprotected. When the subroutine ends, the "protection bit" is popped from the stack and will recover it´s previous state before the call. This way you can call an unprotected subroutne from inside a protected routine, and everything works. The same could be done with operands, but it would take a little more tweaking.... First, each operand should be "protectable". The same way it can have a power-up value, it must have a check box that makes it protected. To get things started, Visilogic could protect all operands whose description starts with "PROTECTED", and hide the rest of description for safety. (Only if the user enabled "Automatic Operand Protection", right below "Create Ladder Password"...) Protected operands can only be used by protected subroutines, screens, trends, tables, etc. Protected operands cannot be read or written by Modbus, Online Test, etc. Any attempt of use of protected operand by unprotected object will either fail or generate compilation error.
  8. 1) In help entry of "Profibus Configuration" block (Home > Communications > PROFIbus Slave) it says that I can have a MB vector from which the master will read bit data, and another MB vector where the master will write bit data. Both are documented as "Vector length = 128 bytes". Is that 128 bits, or 128*8=1024 bits? I don´t have the means to test it by myself.... 2) Also, the "Profibus Configuration" block is connected directly to network. Just to make sure, I don´t need an SB2 "PowerUp bit" contact like many other initialization blocks of Visilogic? 3) Can I have a CLP work with Profibus, Ethernet AND serial, depending on which board is installed? Use SB178 "Profibus Card Detected" to enable "Profibus Configuration" Use SB141 "Ethernet Card Detected" to enable "TCP/IP CARD INIT", "PLC NAME", "Modbus IP Config", "Modbus IP Scan32" None of the above to enable "COM Init", "Modbus Config", "Modbus Scan32" Thanks, Amir
  9. It´s a nice solution, but if you need Modbus over RS232/485, you´ll need to build and check CRC. Quite a hassle...
  10. Yes, I know. It's a major weakness of Modbus, But one thing is to let anybody play with a few variables, and other thing is to let anybody read or change any variable of the whole system, and by comparison find where is the "parts counter" and change it, or scan the memory for non-zero values and try them for password. Or simply randomly write values for sabotage. Once the PLC is on the ethernet, anyone in the network can fool with it and nobody will know who did it, unless there is a network sniffer like Wireshark and a manageable switch to copy traffic from all ports to the port where the sniffer PC is. I'm not concerned anymore, I found a solution to avoid unrestricted peeking and poking, except for I/O ports - I haven't tried them yet. As for security, one can always use encryption. LFSR is a good choice, I once used it to create "random" numbers.
  11. I made a test program, and it works... 1 - Load MI, ML, DW with initialization data (on SB2_PowerUpBit) 2 - Store MI, ML, DW on data tables (on SB2_PowerUpBit) 3 - Load MI, ML, DW with data from data tables (do this on first net of !Main Routine) 4 - Run the program and use MI, ML, DW 5 - Store MI, ML, DW back to data tables (do this on almost last net of !Main Routine) 6 - Vector fill sensitive MIs with 0 - If user tries to read password with modbus, he will read 0. 7 - Call MODBUS SCAN32 on last net of !Main Routine In my first test I was able to hide the contents on an MI (modbus always read it as 12345), make one MI read-only (modbus could read, but writes were ignored) and have a 3rd MI with full access by modbus. In my second test I stored and retrieved all numeric operands, making all of them read-only to modbus. The penalty: scan time (SI0) increased 31mS to load and save 2048 MIs, 256 MLs, 64 DWs, 512 XIs, 256 XLs, 64 XDWs and 24 MFs. Data tables cannot read/store MBs directly - not that I know of. To do the same trick with MBs/XBs, you need to use Vector - Store bits to numeric and save on some operand, then reverse.
  12. As far as I know, once you enable a Vision CLP as Modbus master you can access any MI, MB, ML, DW, etc. This leads to a security problem, as anyone can view data (passwords?) or even worse, write random data. The chances are low, but the risk is high. One customer is a manufacturer and will use V130 to assist the control of high power UPS, rectifiers and Inverters. Among other things, the V130 will provide HMI to configure battery charge voltage. If someone writes MI9999, he will set a new charge voltage. Even though the program limits the value to a valid range, the maximum value can destroy the battery bank or even start a fire. This can be accidental or intentional. To minimize the risks, I tell the user to read data on MIs 1900 - 1999, which hold copies of the real values - the real source data is stored somewhere else. If someone writes anything on these MIs, nothing will happen and values will be refreshed on next scan. I can also change the port of Modbus from 502 to something else, to avoid the risk of an application writing data on V130 thinking it´s another device on same IP. But these measures do not avoid tweaking of the memory outside of the 1900-1999 range. Question: Is there a way to limit modbus access to a given set or range of MI, MB, etc? Any operation outside the box will return "Invalid operation" I just had a crazy idea of using data tables: 1 - Load MI, ML, DW with data from data tables (do this on first net of !Main Routine) 2 - Run the program and use MI, ML, DW 3 - Store MI, ML, DW back to data tables (do this on almost last net of !Main Routine) 4 - Call MODBUS SCAN32 on last net of !Main Routine This way, if the user changes any MI by Modbus, nothing will happen, because all MIs will be reloaded on step 1. And data tables are not accessible by modbus... Going 2 steps further... 1 - Load MI, ML, DW with initialization data (on SB2_PowerUpBit) 2 - Store MI, ML, DW on data tables (on SB2_PowerUpBit) 3 - Load MI, ML, DW with data from data tables (do this on first net of !Main Routine) 4 - Run the program and use MI, ML, DW 5 - Store MI, ML, DW back to data tables (do this on almost last net of !Main Routine) 6 - Vector fill sensitive MIs with 0 - If user tries to read password with modbus, he will read 0. 7 - Call MODBUS SCAN32 on last net of !Main Routine I just wonder how this affects performance, and what is faster? DT Direct RAW Read or DT Read Column? I´ll give it a try and post results, when I have the time. Comments are welcome.
  13. I´m trying to use a Data Table to store message strings. I load a message from a given row to a vector, and then display the vector as ASCII on display of V130. So far, so good. Then I tried to make the table be part of project and be stored in flash. I double-clicked each of 3 columns and checked "Part of project" Now, when I upload project I get message below: "Data Table Part of Project columns contain an odd # of bytes (cannot support SD Tools Editor, or Read Structure functions)" There is no documentation anywhere about this message. I also can´t read valid data anymore... My table is 100 rows x 3 columns, each column is 20-byte string. That´s 6000 bytes (even # of bytes...) I click "File", "Memory Requirements", select tab "Part of project (Flash) memory" and see that my table "Textos 3L" uses 6000 bytes. What can it be? Thanks in advance.
  14. Well, that did the trick! I should have read read Windows manual... Thank you very much!
  15. Visilogic on Notebooks with 2 Displays = DISASTER.... How to reproduce (and explain) the problem: - Open Visilogic on a notebook with external monitor, in extended dektop mode (each screen has different image) - Insert a new "Direct Contact" box (F5) - When the pop-up asking for operand and address appears, move the pop-up to external monitor - Enter some data and close it - Double click on "Direct Contact" - Pop-up asking for operand and address will appear on same place (external monitor) - click Cancel - Disconnect external monitor - Double click on "Direct Contact" - Pop-up asking for operand and address will appear on unreachable place (invalid coordinates of where external monitor was) - All you can do is press ESC and stop working until you get an external monitor. Solution: When Visilogic opens any pop-up, it should check if coordinates are within visible area of desktop. If not, relocate them to (10, 10) Yours, Amir
  • Create New...