ProSoft Technology, Inc.
  Your Location: Home > Support > Bulletin Board > Suggestions/Comments/Feedbacks > MVI69-GSC: possible problems in the provided PLC program Printable Page
 

Search


Default object view. Click to create a custom template, Node ID: 9087, Object ID: 8842

MVI69-GSC: possible problems in the provided PLC program

MVI69-GSC: possible problems in the provided PLC program

I've identified some problems with the sample program provided for this module. If I am mistaken in any way, by all means respond. Thanks!

1. MainRoutine Task:
Rung 0:
The JSR to ProcessBlock is preceded by a condition that "NEQ Local:1:I.Data[0] -1". However, the range of possible values for this input register apparently(?) are limited from 0 to 127. This precondition should be removed since it will never be false.

2. ProcessBlock:
Rung 2:
This contains a "COP SOURCE: GSC.P1_Data.WriteString DEST: Local:1: O.Data[3] LENGTH: GSC:P1_Data.WriteLength"
However, the WriteLength variable is the number of 8 bit characters to transmit BUT the DEST registers are 16 bit INT. Since the COP Length refers to the number of DEST tags, you will transmit 2X WriteLength characters from the WriteString(8bit) to the O: Data (16 bit). ALSO, WriteLength must not be greater than 25, or you will begin to write over port2 data, starting at O: Data[28]!!!

Next Issue:
WriteLength cannot be greater than 50, because that exceeds the available O:3-O:27 Data space(16 bit INT)! Therefore, tags GSC.P1_Data.WriteString[50-199] can never be transmitted in the program as written and thus should be deleted.

Rung3: "FLL 0 Local:1: O.Data[2] Length 25" should actually be length 26 to fill Data[2-27]. Beyond that, the FLL isn't necessary, since data-write is triggered by a non-zero WriteLength value. If asyncronous capture of old data is of concern, simply flip the COP instructions in Rung 2 so that good data is in place prior to filling in WriteLength value.

Again, if I am off-base in any way, please respond!

Thanks

No

Name Class Section
Document RE:MVI69-GSC: possible problems in the provided PLC program Forum Reply 17
Document RE:MVI69-GSC: possible problems in the provided PLC program Forum Reply 17
Document RE:MVI69-GSC: possible problems in the provided PLC program Forum Reply 17
Home : Products : Support : Distributors : Services : News/Events : Contact Us : ProSoft Tested