I have created a program in step7 V5.4, using S7-300 controller, CPU-315-2PN/DP. The routine I created is a printing routine using a ******* devicemaster. I setup the device master to be able to accept outputs in the range 1152-xxxx.
In my routine I have 12 different structures all in the same format the first 2 outputs are 2 bytes each and are words, then there are another 34 output bytes each as char.
I have a counter incrementing so that a different structure is inputted into a instance block for each different count.
The instance block, takes the copied structure and ouputs it to each output address byte by byte.
My problem lies with the structures that are being sent into the instance block. All the structures are of the same format, but for some of them the information is not read and 0's get sent into the instance block for each byte.
The could to send the structures is correctly working, 2 of the structures that were working can be sent all day, I set one strcuture to be sent for every even number and another different one for every odd number, and this works fine I get the information everytime sent to the instance block and out to the outputs.
It seems like the problem is reading from the DB for my main routine which contains the instance data block call and all the structures it like it does not read the correct information.
For some reason I cannot change the information in the strcuture that I am sending out, I changed the initial value and saved it updated the block, go to the DB and it is changed in there, but when I send out that structure it still has the old number.
I have copied the contents of one working structure into a non working structure and I still get 0's.
And this is only for some fo the structures, which again are all the same, but for some reason some are read and some are not.
If someone could please help it would be great I will show a copy screen shots for information.
In my routine I have 12 different structures all in the same format the first 2 outputs are 2 bytes each and are words, then there are another 34 output bytes each as char.
I have a counter incrementing so that a different structure is inputted into a instance block for each different count.
The instance block, takes the copied structure and ouputs it to each output address byte by byte.
My problem lies with the structures that are being sent into the instance block. All the structures are of the same format, but for some of them the information is not read and 0's get sent into the instance block for each byte.
The could to send the structures is correctly working, 2 of the structures that were working can be sent all day, I set one strcuture to be sent for every even number and another different one for every odd number, and this works fine I get the information everytime sent to the instance block and out to the outputs.
It seems like the problem is reading from the DB for my main routine which contains the instance data block call and all the structures it like it does not read the correct information.
For some reason I cannot change the information in the strcuture that I am sending out, I changed the initial value and saved it updated the block, go to the DB and it is changed in there, but when I send out that structure it still has the old number.
I have copied the contents of one working structure into a non working structure and I still get 0's.
And this is only for some fo the structures, which again are all the same, but for some reason some are read and some are not.
If someone could please help it would be great I will show a copy screen shots for information.