Jump to content

Patrick

Members
  • Posts

    38
  • Joined

  • Last visited

Posts posted by Patrick

  1. Morning all,

     @Ausman Thanks for the Ascii table, it was very helpful. 

    What I have done is created a setup screen which appears on power up only when no lane number has been assigned, i.e. the relevant MI = 0.  Once a lane number has been assigned to that MI, all other required information is pulled from the Datatables.  The idea is that the PLC can be shipped without a lane number, the person installing simply has to switch on and set the lane once. 

    If for any reason the MI gets zeroed, I have put in a passworded, hidden button on the admin screen.

    The  'Set PLC Name' is now functioning perfectly.  It is set up in Hex with 'Lane' being fixed and ' _05' (for example) being loaded from a datatable.  I did it this way to avoid the risk of having a Null getting in as @Flex727 mentioned.

    844221775_PLCName.JPG.836bcdea11ed3d8e70f237c0b803c844.JPG

     

    @CamThanks for the idea, I have incorporated it as well

    @Flex727I do tend to refer to Datatables as tables, I shall try to be more precise in the future!

     

    Thank you all again for your help, it is very much appreciated as I am self taught and learning all the time.

  2. Thanks guys, I understand most of it now.  First of all I was trying to put a single character in each MI rather than 2, and in Decimal not in Hex, and to be honest I would never have thought of doing it in reverse.

    @Ausman I need to be able to name the PLCs Lane_1 to Lane_99.  The lane number is input on a setup screen, and the PLC then gets it's name,  IP etc from various tables.  On my test screen the name now comes up perfectly, but the PLC Name block is not loading the vector on power up.  Does the PLC load power-up operand values before / during / after SB 2 cycle?

  3. 43 minutes ago, Ausman said:

    What happens if you change your MB0 to SB2?  At present it looks like you are calling this net every scan, which might be upsetting things.

    I also think you need to redo your vector.  Try along the lines illustrated by MI230 being 24908 (H-614C).

    cheers, Aus

    Hi Ausman,

    MB0 is set by SB2 in the first rung and resets after all start up rungs have completed.  Everything works except the PLC Name.  If I use the direct string option everything is fine, so I do not believe the problem stems from there.

    I do not understand "Try along the lines illustrated by MI230 being 24908 (H-614C)"  Could you explain a bit more please.

     

    Cheers

     

    Patrick

  4. Good morning all,

    I want to set the PLC name using the Indirect : Vector option

    I have set up the vector as shown in the screen shot

    1849018211_Capturearray1.thumb.JPG.6ede73196650c04460d95f4cfc6f5618.JPG

    and the operands are all in place

    32397855_Capturearray2.JPG.1cb80a29051c6c2b5bc23e7d02ba5450.JPG

    But when I power up there is nothing in the PLC NAME block

    I tried a test screen, and it only reads the first letter, i.e. capital L

    548362609_Capturearray3.JPG.ed8b864a4ae4314974661c30ff78365f.JPG

     

    I have obviously missed / misunderstood something.  Any guidance would be appreciated

    Cheers,

    Patrick

     

     

     

     

     

     

  5. I did a test program to try and work this all out.  Very frustrating.  I have tried using the addresses I found with CAS Modbus Scanner (shown in previous post), in both decimal and hex.  I have not been able to read or write anything at all to the device with Visilogic. 

    I then realised that every time I tried to send a message, the status operand was giving me 4 for each attempted send, than going to 5 when finished.  This leads me to believe that the communications are the first problem to solve.  I have looked at the examples, but can not see anything different to what I am doing.

    The remote IO device works fine with both CAS Modbus Scanner and Modbus Poll, so there should not be be any communications issue.  SB147 tells me that the socket is connected, i am not sure what to do next.

     

    Test program Modbus TCP with constants.vlp

  6. Hi Guys, thanks for the pointers.

    In case this may help anyone else with similar newbie problems, here is what I have done so far.

    One of the things I noted while reading through the forum was to always use Modbus testers before trying put together a program.  I had a hunt around, tried various freebies, and so far I have discovered a few things about the device, which as Ausman correctly guessed comes from Asia.  http://www.hi-flying.com/hf6208

    Using Modbus Poll Test Center, I managed to turn on and off the output relays by copy pasting the various instructions from the manual

    606162961_ModbusPoll1.JPG.2de76bf69d8a0b2b93a45c322f680568.JPG

    But this did not help with identifying what was going on elswhere.  So using CAS Modbus scanner I managed to get the following :

    1589723248_CASDiscover.JPG.f08d78dcbebab0daa7869ee77afc9d59.JPG

    I then used the same tool to check the addresses with function 01 and got the following

    289560307_CASFunction1.JPG.568600c81c80aa3b3c8fbd6285df86d2.JPG

    Function 2 gave me this

    1354198436_CASFunction2.JPG.3ab22a137063b92f767eb29b35355e02.JPG

    Function 4 gave me this

    1353242951_CASFunction4.thumb.JPG.c48be94d6ed698a4e82b2e15838b9502.JPG

    At the moment there is a single analogue input, a single digital input, and 7 relays on and one off.

    So far so good, I can read the status of everything, but I am still having problems with function 5.  With the exception of Modbus Poll Test Center, every other test i have tried strips out the two zeros after the function bit.  i.e. I try to send 01 05 00 10 00 etc, but only manage 01 05 10 00 00 etc, which returns an error.

    Can anyone enlighten me as to what is going on?

    Cheers

     

     

  7. Good morning  everyone,

    I have set up a calibration sequence where the operator needs to input data in a particular order.  I would like to automatically call for a keypad to appear on the screen when a condition is met, the operator inputs the measurement, and when he presses enter, the sequence will continue until the next call for a keypad.  Unfortunately I have not found the secret to call the keypad.  Any pointers welcome

    Samba 7

  8.  

    I have already purchased a Vision which will act as controller over an Ethernet network and will allow remote access, but have not yet finished the application.  I will add an SD card.

    I have set up a table in each samba, after 15 minutes inactivity the screen turns off (backlighting off, black screen loads) and i tacked on the save  to table after this.  It works perfectly and is not chewing up resources.

    I also suspect a grounding /  EMI issue as I sometimes have erratic reading from the encoders.

     

  9. 19 hours ago, Flex727 said:

    What do you mean by "permanently"? All register values are automatically retained unless they are assigned a Power-Up value or the PLC is powered off with a dead battery.

    An installation I did in 2018 had a city wide power outage recently, and 8 out of 10 Sambas had to be reinitialised in order to restart.   They got stuck on the splash logo. 

    I have since updated the OS, loaded a newer version of the application and everything is fine.  However I want to know how the users are using the system, and I do not want to lose that data through a potential future initialisation.  

    My question was to learn if there is a more elegant method of saving this type of incrementing data without using tables.  I make certain assumptions : batteries will go flat, power will fail, and no matter how smart the system may be, an idiot will find a way to screw it up.

  10. Hi all,

    I want to set up a counter that will record the number of times various buttons are pressed on a Samba 7".  In itself not a problem, but I want the result to be safe from initialisation.  I thought about doing a data table but it seems a bit long winded.  Is there a method I can use where the result from an incrementing counter can be saved permanently?

    I have had a good browse around the forum, but am probably using the wrong search phrases.

    Any pointers or advice will be appreciated

     

  11. The only built in serial is the mini USB for programming

    Also in the Samba 7 technical spec :

    Notes:
    6. The user may order and install one or both of the following modules:
    - A serial RS232/RS485 isolated/non-isolated interface module, or an Ethernet Interface module in port 2.
    - A CANbus module
    modules documentation is available on the Unitronics website.

     

    So I have Ethernet modules and CANbus modules available for the Sambas, and the Vision is delivered with it built in !

     

     

×
×
  • Create New...