Hi all,

what Tim describes is in the regular repo. We had to indroduce this "hack" as 
we did not find any working documentation of the hex codes.
So I agree with you that it would be better to do it the "right" way but as we 
needed these types we simply took the "easy" way.
But in fact, for users it should make no difference as this is all abstracted 
away by the API so no one would recognize if we switch the implementation, I 
guess?

Julian

Am 15.10.19, 11:36 schrieb "Christofer Dutz" <[email protected]>:

    Hi Tim,
    
    So depending on the TYPE constant used in the address (the actual String 
"enum name") you ask for raw bytes?
    Is this in your PI fork, or is this in PLC4X main repo?
    
    I was thinking that this probably is not the way a S7 works ... cause if a 
HMI asks for this data I doubt they built it the same way ... so I would expect 
it to use other hex codes.
    We should probably continue the reverse engineering I did with my S7-1200 
more than two years ago with your S7-1500 ... perhaps this way we can track 
down some more codes ... 
    there are quite a number of blanks which I can't even test as my TIA Basic 
doesn't allow me to specify these types :-/
    
    Unfortunately my PcapGenerator 
(plc4j/protocols/s7/src/test/java/org/apache/plc4x/java/s7/PcapGenerator.java) 
only generates PCAP packets which it lets Wireshark decode and inspects the 
output. 
    I could ask the S7 Guru for some clarification on this. Perhaps he has some 
insights.
    
    It's not really causing problems ... it just showed that there was some 
ambiguity with the codes ... I updated the mspec a little and now I should be 
able to continue.
    
    Chris
    
    
    Am 15.10.19, 10:41 schrieb "Tim Mitsch" <[email protected]>:
    
        Hey
        
        I extended the implementation because S7-1500 family returns a not 
known datatype for those date-types, and there was a need to read those types. 
So I acquire a set of bytes and extract the date information from that.
        If that causes problems with the simulator we should have a deeper look 
into that.
        
        Best
        Tim
        
        
        Am 14.10.19, 18:08 schrieb "Christofer Dutz" 
<[email protected]>:
        
            Hi all,
            
            While working on the PLC Simulator I stumbled into one pit … when 
receiving a read request and deserializing this, I was confused why a read 
request for one BYTE was received as a DATE_TIME.
            A quick look showed me, that there are multiple types with the same 
code. I thought that this would not be causing any problems as long as all 
codes result in the same number of bytes being read.
            Unfortunately it seems with the dates and times this doesn’t seem 
to fit well.
            
            Not all PLCs support all of these types. But I would like to sort 
this out as for example DATE_AND_TIME (0x02) reads 8 bytes, but TIME_OF_DAY 
(0x02) reads 4 byte and DATE (0x02) reads only 2 bytes. I guess the way it’s 
currently setup, this can’t be correct.
            
            Do you have an idea how we can sort this out?
            
            Chris
            
        
        
    
    

Reply via email to