Jump to content

Simon

MVP 2014
  • Posts

    598
  • Joined

  • Last visited

  • Days Won

    34

Posts posted by Simon

  1. Hi Don,

    See the examples:

    C:\Program Files\Unitronics\Unitronics VisiLogic_C\Examples\Version 900\Project examples\Communications\MODBUS

    then look for V280_Modbus_port_to_port_test.vlp

    change the hwardware properties to V570 and download it. It sets one port as master and one also slave so you can do a loopback. Very handy when testing Modbus comms, so you can at least confirm if the PLC Modbus is working. Then you can plus in external masters/slaves.

  2. Just running some unrelated tests using the COM port sniffer. The "garbage text" is part of the MIME encoding. It originates from the PLC, and is necessary if the email contains attachments. Email clients should be able to strip it out, but sometimes they get confused. Changing the message type from plain text to HTML does not make much difference.

    Can we have the option to send without MIME encoding if we have no attachments?

    Below is an extract from the mail text that is sent by the PLC to the mail server

    MIME-Version: 1.0

    Content-Type: multipart/mixed;

    boundary="KkK170891tpbkKk__FV_KKKkkkjjwq"

    THe "boundary" field then ends up at the bottom of the message when it is received and viewed in Outlook

    --KkK170891tpbkKk__FV_KKKkkkjjwq--
  3. As a follow up, I had the need to re-enable this custom Visilogic Navigation Panel. It seemed to give me visibility of all the folders I needed. However I quickly found out why I turned it off. In thumbnail mode it takes a long time to generate the thumbnails (5-10 seconds). Each click on the scrollbar re-starts the process. During this time, the HDD doesn't do much, but one of my CPU cores goes to 100% activity. Looking again today, the speed is OK when navigating the standard Unitronics image library. However if I go to one of my image folders, that contain photographs, that's when the time blows out. Presumably this is becuase the Unitronics image lbrary contains images with small file size, in comparison to photos.

    FWIW I am running WinXP SP3 with a core2 Duo CPU, 2.2GHz with 3GB of RAM. The standard windows file picker in thumbnail mode updates much faster (less than one second), regardless of whether there were photos involved or not.

  4. Sounds like a list of texts by pointer, with built in functions:

    • to scroll up and down (no need for INC/DEC in ladder)
    • select the currently displayed entry (no need for COMPARE in ladder)
    • more flexible loading of dynamic string source data, maybe direct link to DT?

  5. Hi Damian,

    I know what you mean. I encountered the same kind of thing when setting up an email app. I set up blocks of MI vectors with the messages, then use vector copy to select the desired message and move it to the MI block that the email send is linked to.

  6. The question is what is my best way to protect key pieces of data even after a battery failure so that only the user enterable variables would need to be re-entered after a battery failure? Flash burned table, loading values into MIs and T variable on first scan every time, other solution? I am looking at this for Jazz, M91, and V series controllers.

    If it is OK to initailise the values to your defult settings on every power-up, then set them as "power up" values in the required operands.

    Note that if you set a timer preset value in the ladder program, that value is retained as part of the project. If the timer preset has been modified online, then the battery dies, the timer preset will revert back to the original value as set in the project file.

    Otherwise, if you want to re initialise the values on demand rather than at every power-up, use Emil's suggestion of putting values into a DT as Part of Project.

  7. Also make sure the "Ignore Break" option is checked in the COM INIT block in the PLC project in Visilogic. The "break" command is a binary sequence that is used to reset the PLC com port to known parameters. Once you enter a GPRS session, the data stream is raw binary data and could (by random chance) contain the break sequence. By checking "Ignore Break", you prevent any random occurrences of the break sequence from stopping communication.

    The only downside is that this disables the ability for Visilogic to automaically match baud rates with the PLC, when communicating on the port you are using for the modem. This is a moot point for the V1040 as it has 2 ports. But should you need to use Visilogic on the port that is configured for the modem, just be sure to enter the correct, matching baud rate in the Visilogic PLC comms parameters and all shoud be OK.

  8. Good point about the SMS Scan conflicting with GPRS. Ditto if you are using the SMS CSQ function to periodically check signal strength.

    It sounds like you are close. If you were able to connect once by calling from the PLC to your PC, that would indicate the APN and so-on are correct in the PLC modem. I would persist with establishing that you can get a reliable connection by calling from the PLC back to your PC, even if that is not the desired mode. If it is not working consistently in call mode, then you don't really know where you stand once you start to try it in listen mode.

    To test the modem from a PC, set up a standard Windows Dial-Up Networking connection using the serial port that the modem is connected to. For the phone number put *99#. When you dial that number the modem should initiate a GPRS session, and if ti is susscessful the Dial-Up Networking system on the PC should indiate you have an internet connection.

    This might sound silly, but is another valuable insight I have from my initial attempts to set up GPRS. After your partial success, turn everything off, disconnect the cables, put it all in a box and go do something else. Come back the next day and set it all up again and start fresh. The temptation is to leave it running and keep tweaking to try and make it work. Some problems give you direct clues to help you solve it, but I have found with modem setup that if one thing is wrong it just doesn't work.

    Also, do you have a COM port sniffer? This is essential for debugging modem comms and taking away the dread fear that something is happening but you don't know what. Search the Visilogic help file for "sniffer". There is one built in to the V1040 info mode, but for "power sniffing" I would use the hardware based one that allows you to see the results in Hyperterminal. That way you can capture and save results. Build it yourself based on the instructions in the help or order it from Unitronics, MJ10-22-CS16.

  9. The only way I can see to do this would be to convert the number to an ASCII string and set those properties in the string conversion. Then save the value to the DT as a string instead of an MI.

    I guess the underlying question is: Why do you want to display the number in the DT with leading zeros? Usually that format is used to make a neat HMI screen or to simplify ASCII communications (for example with data from digital scales or barcode readers).

  10. I recall something like a modulus behaviour. So if I give the output 4095 or 8191 it will show the same value. Memory is vague...

    Ditto to the above comments. IMHO some internal self checking and limiting is preferable to documenting the current behaviour. Out of range values should set the output to a known state (full scale or zero) and possibly also set an error SB. Even one "out of range" SB for all analogue outs is better than nothing. We should definitely not have values applied to one output affecting another.

  11. Damian:

    Thanks for the info. I tried unchecking the image browser like you mention, but Visilogic continues to use it. Even re-booting Visilogic doesn't help. Have you tried navigating for an image since the time you unchecked it? Can you confirm that unchecking it actually had the desired effect?

    Yes it has gone back to the standard Windows file picker. I made the change some time ago.

  12. Hi Damian,

    Visilogic 9.3.0 introduced this new Graphics Navigation panel.

    http://www.unitronic...n%20Changes.htm

    I must say I am not sure what advantages it offers. As soon as I encountered it, I had a similar experience to you and went in search of how to turn it off. Maybe it looked a little prettier once an image folder was in view, but the shortcomings in actually navigating to folders were more noticeable than any improvement.

    See image below for details on how to turn it on/off (go to menu Project -> Properties)

    post-16-036044100 1314229668_thumb.jpg

  13. Hi, it looks like you have a few issues tied up together.

    Firstly on the issue of Data Tables, the content of the table is not automatically uploaded/downloaded with the project. You can do this manually by:

    * connecting to the original PLC and open the Data Tables inteface in Visilogic.

    * do a Read Tables, check all tables have been read into the PC

    * Save the tables (select File -> save in the data tables window)

    * close the data tables window.

    * connect to the new PLC

    * open data tables interface

    * write all tables.

    Regarding timers, the presets should follow with the program, but not necessarily the current values. However I would not expect the timers in the new PLC to take on random values.

    Can you try downloading a blank project to the new PLC then re-load your target project? I have occasionally seen timers do weird things after dowlnoading a new project and this step of downloading a blank project seems to fix it.

    As for the touch screen, if you see that problem again try performing a touch screen calibration (via Info mode).

  14. You need the num to ASCII function.

    post-16-027264500 1313711839_thumb.jpg

    To create a string of date then number, just put the results in adjoining MI locations.

    In my screenshot the RTC to Num puts its result in MI0...3 then it puts a Null in MI4 to terminate the string. If we tell the num to ASCII to put its result in MI4, then that now becomes part of the date string.

    Also, to put the space in between the date and the number, use the "leading spaces" option on the num to ascii and also set the "Result String length" parameter to be longer than your number. For example if you are only going to have 1 digit, then set the result string length as 2, set Leading Spaces, and you will get a space in front of the number. If you want more spaces, just increase the Result String Length further.

    I hope this helps.

×
×
  • Create New...