[Visual-devel] Re: Visual: Faq revisada y work en =?iso-8859-1?q?espa=F1ol?=
Status: Alpha
Brought to you by:
lettoz
From: Thomas H. <Tho...@we...> - 2002-11-05 18:01:43
|
On Tuesday 05 November 2002 13:16, you wrote: Hello Ruben, I didn't receive or see this mail completely this afternoon, but know, after downloading with mail reader, it seems to be complete. So I try to answer the oter questions: > visual.cfg.allen.1 we intend enabled logs, but if we intend, visual > crash, it can't start. Ok, from the output I see that log_mysql cannot find some function from libmysqlclient. Do you have it? If so, I will check why this happens. >If we intend with visual.allen, visual runs but errors messages clean >screen and if it impossible for view nothing. Should be fixed now > > In spreedsheet, we only have one spreedsheet, and it is empty. We > probed, too, to copy 1.set from spreedsheet test, but again, nothing. No it, is 1.sht. 1.set is a file containing the last settings of switches, potentiometers etc. connected to sheet 1. > > Well, we don't understand this at all. We must provided to spreedsheet a > numerical cell, but where PLC writes? The driver changes the values of numerical cells writing PLC data into them. > Where we specified PLC that there are cell to write and no other? In your case in ab.tfi. The format should be explained in the HTML documentation. This is the only line from ab.tfi: <ALLENB> 'my first test' 15 162 137 7 200 20 1 'B1' 'E1' 'A1' </ALLENB> And here is what that means: <ALLENB> marks an instruction for Allen Bradley driver 'my first test' a comment. 15 AB's command code for 'protected read with 3 byte address' 162 AB's function code for 'protected read with 3 byte address' 137 AB's code for integers 7 Use file (N)7 in the PLC 200 Start with element 200 20 20 bytes 1 use spreadsheet 1 'B1' data goes into cells B1 to B10 'E1' error codes go to E1 'A1' this instruction is executed if A1 is not 0 </ALLENB> ends an instruction for Allen Bradley driver A spreadsheet used with this line must have the following cells, all numeric: B1 to B10: to store results. If one of them is not there, the data for this cell is simply thrown away. E1: This will be set to zero if all is ok, to error codes otherwise. Notice that in the test output you sent me, the driver wants to set E1 to 512. This means "timeout". A1 This cell must exist, be numeric and value must be nonzero, otherwise this instruction will not be executed. Just write a one to it. So why does it write ten cells? The length of data to read is set to 20 bytes. As the data type is integer and AB's integrs are two byte, we get 10 integers. Data is stored to the spreadsheet beginning with the cell given in the instruction (B1). The next data goes to the next ROW: B2,B3...B10. Possible difficulties: I do not know how data is organized in a Micrologix 1500. 1.It may not have a file number 7. If so, change the 7 to an existing number. 2.It may not have more than 200 integers. If so change the 200 to something lower. I suggest 0. 3.It may not store integers in file 7. The only other data type currently supported is floating point. AB's code for this is 138. But I think you can also read bit files as integers. About a PLC program to test this: Currently, there is not much use to connect outputs, as VISUAL will not write to the PLC. You need to read something from it. I would set up a little program that counts using integer values. Then you can read out the counters value. Don't use special counters in the PLC as they might not be accessible. Do it with Integer addition. Good luck salutations Thomas |