Jump to content

Set PLC name - Indirect : Vector


Recommended Posts

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

 

 

 

 

 

 

Link to comment
Share on other sites

  • MVP 2023

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

Link to comment
Share on other sites

  • MVP 2023

edit on this....  Now about 12 hours later the forum went offline for a few minutes whilst I was finishing up doing another answer.  On accessing the forum again without login, everything seemed ok.  Some sort of gliche they've fixed?   However, now about 1/2 hour after posting this edit, the odd behaviour is still there.  All my posts this morning have disappeared from normal access.  Yet they are all there if I log in.  Ho Hum.......

 

@Cara Bereck Levy  Note after my above post.  There are perhaps other answers above mine which might be saying the same thing as me, but I can't see them at present.   The forum is currently behaving oddly, as my answer I did 20 minutes ago has still not appeared for general perusal.   But if I'm online it is showing as being there and in the right hand precis column.  Very odd.  So perhaps this is also applying to other members' answers that have auto approval or needing mod approval.

cheers, Aus

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • MVP 2023
16 minutes ago, Patrick said:

MB0 is set by SB2 in the first rung and resets after all start up rungs have completed.  Everything works except the PLC Name. 

Not sure why you aren't using SB 2 here, but I agree it's not the source of your problem. What I see is that the numbers entered into the MI 230 vector don't look like valid ASCII characters (I haven't checked, so I'm not certain). Remember that each MI contains 2 characters so figuring out the value to assign to the MI is not that straightforward.

Link to comment
Share on other sites

  • MVP 2023
11 hours ago, Ausman said:

Try along the lines illustrated by MI230 being 24908 (H-614C)

My impression is that you are trying to name the PLC " Lane 99 ".  This means that MI230 is the first of the string, with the Letters " La ", but in reverse.  I might have the needed reversal confused with other string needs, but this is the reason.  If that shows up as reversed, then it would be H-4C61.

Just for usefulness, I've attached the ASCII table I use.

cheers, Aus

asciifull.gif

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

If your getting the Name and IP from data tables I'm not sure this will happen during the power up cycle.

 

Here's an example as to how I handle getting the IP information from a Datatable, net 4 is if we modify the configuration it causes a write back to the data table and then re-initializes the PLC's NIC so it has the new settings.   It is still all driven by SB2 but also allows you to modify the PLC's information on the fly if required.

image.png.205ddfbb5b59ea4af1c9f70517886f91.png

Link to comment
Share on other sites

  • MVP 2023
2 hours ago, Patrick said:

Does the PLC load power-up operand values before / during / after SB 2 cycle?

It shouldn't matter. Assuming the battery is good, the values in the operands are retained and do not need to be restored during power-up for the value to be available to the name block. You don't really show how you are combining the strings for the name block, but be careful about the NULL value at the end. I've been bitten by that before.

26 minutes ago, Cam said:

If your getting the Name and IP from data tables I'm not sure this will happen during the power up cycle.

Did I miss something? I don't see where the OP mentions any interaction with the Data Tables.

Link to comment
Share on other sites

 

 

17 minutes ago, Flex727 said:

Did I miss something? I don't see where the OP mentions any interaction with the Data Tables.

See the highlight below maybe it's a terminology issue and tables is supposed to be operands, but for me if your referring to tables it's a datatable.

2 hours ago, Patrick said:

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?

 

Edited by Cam
Edited for clarity
Link to comment
Share on other sites

  • MVP 2023

Patrick, I don't know the answer about data tables being available on boot, but I'm a bit with Cam on this one.   I'd be letting the PLC stabilise for a few seconds on boot, and then apply things that can't  only be done on startup. 

However, call me cautious, but in a situation like yours I'd be setting things up in a way that makes it impossible to "fiddle". I would use an MB or MI "code number" as the "Master Unit Setter" to set whatever Lane the unit is going into.  This would only be accessible to someone who has access to Info mode via a good password, and not be normal HMI visible at all. The unit then picks up on this set/number that is preset first time after fitment with the unit stopped.  It will be automatically retained by battery by leaving power up bare for that operand, and during boot and a few seconds afterwards loads up everything else relevant, waits until it is all done, then actually starts working.  If the thing is coming on from boot then a few more seconds until it works isn't an issue.  The naming convention should actually be fairly easy with this method by having " Lane_" as a fixed text, with the number which can be my "code number" being the lane number which is appended to the text as another block.  On screen it won't look any different.

Many years of putting up with users "who will never touch crucial settings", but do, is the reason for me locking things up a lot.

cheers, Aus

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

On 3/31/2021 at 2:22 PM, Ausman said:

 

@Cara Bereck Levy  Note after my above post.  There are perhaps other answers above mine which might be saying the same thing as me, but I can't see them at present.   The forum is currently behaving oddly, as my answer I did 20 minutes ago has still not appeared for general perusal.   But if I'm online it is showing as being there and in the right hand precis column.  Very odd.  So perhaps this is also applying to other members' answers that have auto approval or needing mod approval.

cheers, Aus

Hi Aus--apologies, we have just finished our spring holiday cycle here in Unitronics-land; I was not here last week.

The forum is externally hosted; there may have been some update  running or somesuch. Now, meaning today, I don't see anything out of place...

Great thread, btw!

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...