Announcement

Collapse
No announcement yet.

P2-350 Array Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Westmeath
    replied
    Sorry, I posted my fix before I saw your query re: parsing.

    Yes, the reason is the do-more (even with re-configurable memory) does not have enough room to hold all of the incoming data stream.
    If you think of a spreadsheet, the csv file is equivalent to 5 columns (approx 25 chars ea) and about 2100 rows deep.

    This pretty much fills the do-more memory to capacity (actually I tried this first) with no room for the remaining requirements of the data, as in separate work centers, display to different C-More screens and add timing for arrival of product to the respective work stations.

    My worry is that I do not have control of the size of the incoming csv file and it may grow to 2500 lines (though not likely).

    Wishing the Productivity series PLC's had Ascii in via Ethernet...(hint hint to the designers)

    Leave a comment:


  • Westmeath
    replied
    I believe I have solved this...

    I was using a N/O contact (Switch in RUN bit) as an AlwaysOn bit for the CopyData command.

    I changed this to a NOE (Normally Open Edge triggered One Shot) to cycle the Copydata command after each AsciiIn complete tag, and now the Dataview shows the Ascii text being written into the respective array slots and staying there. I suspect that using an always-on bit to enable the Copydata command, data was trying to write to the array each cycle, as opposed to just after each update of the LabelID string.

    BTW, the greyed out field in Dataview (the Value field) is still grey, and I suspect that is because it is not an editable field.

    Again thanks for your input and I look forward to utilizing the forums more often, as this was my first posting. Have been using Automation Direct PLC's and screens for many years.

    Leave a comment:


  • plcnut
    replied
    Is there a reason that you are not doing the parsing in the Do-more?

    Leave a comment:


  • Westmeath
    replied
    Thank you for your reply.

    I see no other way within ProSuite (Ver.2.2.0.(12) to index a variable other than within an array. My goal is to populate the array, then pull the data out of the array based on a bar code scan.
    I am not comfortable enough with mnemonics to post in that mode and I did not see a utility within Prosuite to translate the ladder. Again, very new to this software.
    I will try to explain what I have. To start I would tell you that when I go to DataView and monitor the array that I created, I see the incoming data populating the array, however the Value field is greyed out in DataView and the incoming ascii string appears in each Value field as would be expected, but again in a greyed out Value field. As soon as the incoming sequence (running about 8 cycles for test purposes) ends, the text in the populated greyed out Value field within Dataview disappears.

    I am pulsing a Boolean bit to cycle the AssiiIn command to fetch the string in the incoming buffer.

    AsciiIn: Destination - LabelID

    I am incrementing a counter based on AsciiIn Complete Tag, and using CopyData to write the string to the array.

    Counter: Current Value - LabArrCnt

    CopyData: Source - LabelID, Destination - LabelArry(LabArrCnt) and type is Copy Binary

    Is there a way to convert the ladder within the ProSuite software into mnemonics so that I can post the code?
    I think the key to this is that the dataview Value field is greyed out, almost like I had assigned the incorrect datatype to the array, but when I check the tag database is clearly shows the created array as 'String'.

    I am not sure why the array will not retain the copied values with in the respective array fields.

    Leave a comment:


  • kewakl
    replied
    Post example project, please.

    Does ASCII (text) need to be in an array?

    ASCII IN (AIN), or Custom Protocol In (CPI) should get you started.
    I have used CPI with COPY CHARACTER (CPC).
    Last edited by kewakl; 04-08-2016, 04:53 AM.

    Leave a comment:


  • Westmeath
    replied
    Equipment listed incorrectly

    Sorry, my bad, the P2 above should read P2-550 NOT P2-350.

    Leave a comment:


  • Westmeath
    started a topic P2-350 Array Question

    P2-350 Array Question

    Equipment: P2-350 (for it's memory size)/ H2DM1E-Do-More (for receiving ASCII text file over the internet)
    I am new to the Productivity series, though most of it is intuitive, I am stuck on trying to get my data into an array. Currently successful receiving ASCII text file in csv format via internet into the do-more, then sending it back out via RS-232 port into the P2-350. (P2-350 unable to rx ascii data via internet)
    My issue is I do not understand how to feed the received ASCII strings into an array within the P2-350. I do not recognize a command to do this. I want to populate an array with the incoming data. I tried indexing Fill Array (FLA) but that did not put my ascii text into the array. I tried CopyData but I get an error if I attempt to assign an indexed variable to the ArrayTag.
    I suspect I am overlooking the obvious, but any help would be greatly appreciated.
Working...
X