plc.myforum.ro Forum Index plc.myforum.ro
PLCs users www.plc.myforum.ro!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Siemens FB visualisation of shape of impulse of sensor

 
Post new topic   Reply to topic    plc.myforum.ro Forum Index -> PLC Tutorials
View previous topic :: View next topic  
Author Message
mascalzone
Junior
Junior


Joined: 20 Nov 2016
Posts: 11

PostPosted: 14/01/2017 19:04    Post subject: Siemens FB visualisation of shape of impulse of sensor Reply with quote

This is function block is written on STL.
It is for visualisation of shape of impulse of sensor.
This is implement like FB and there must be DB instance for it



Code:

 AN    #_1_SHOT_MESUARE //memory for one's mesuare
      A     #Sensor // input signal from sensor
      FP    #FP_SENSOR
      S     #_1_SHOT_MESUARE
//10ms mesuaring
      A     #_1_SHOT_MESUARE
      FP    #FP_10ms
      L     S5T#20MS
      SE    T     69
      A     T     69
      FN    #FN_10ms
      A     #Sensor
      S     #_10MS
//20ms mesuaring
      A     #_1_SHOT_MESUARE
      FP    #FP_20ms
      L     S5T#40MS
      SE    T     70
      A     T     70
      FN    #FN_20ms
      A     #Sensor
      S     #_20MS
//30ms mesuaring
      A     #_1_SHOT_MESUARE
      FP    #FP_30ms
      L     S5T#60MS
      SE    T     71
      A     T     71
      FN    #FN_30ms
      A     #Sensor
      S     #_30ms
//40ms mesuaring
      A     #_1_SHOT_MESUARE
      FP    #FP_40ms
      L     S5T#80MS
      SE    T     72
      A     T     72
      FN    #FN_40ms
      A     #Sensor
      S     #_40ms
//50ms mesuaring
      A     #_1_SHOT_MESUARE
      FP    #FP_50ms
      L     S5T#100MS
      SE    T     73
      A     T     73
      FN    #FN_50ms
      A     #Sensor
      S     #_50ms
//60ms mesuaring
      A     #_1_SHOT_MESUARE
      FP    #FP_60ms
      L     S5T#120MS
      SE    T     74
      A     T     74
      FN    #FN_6xSms
      A     #Sensor
      S     #_60ms
//7xS mesuaring
      A     #_1_SHOT_MESUARE
      FP    #FP_7xSms
      L     S5T#140MS
      SE    T     75
      A     T     75
      FN    #FN_7xSms
      A     #Sensor
      S     #_7xSms
//8xS mesuaring
      A     #_1_SHOT_MESUARE
      FP    #FP_8xSms
      L     S5T#160MS
      SE    T     76
      A     T     76
      FN    #FN_8xSms
      A     #Sensor
      S     #_8xSms
//9xS mesuaring
      A     #_1_SHOT_MESUARE
      FP    #FP_9xSms
      L     S5T#180MS
      SE    T     77
      A     T     77
      FN    #FN_9xSms
      A     #Sensor
      S     #_9xSms
//10xS mesuaring
      A     #_1_SHOT_MESUARE
      FP    #FP_10xSms
      L     S5T#200MS
      SE    T     78
      A     T     78
      FN    #FN_10xSms
      A     #Sensor
      S     #_10xSms
// Transfef status impulses to output for OP operation panel
// To this time I did't check it on real
      A     #_10MS
      =     L      2.0
      A     #_20MS
      =     L      2.1
      A     #_30ms
      =     L      2.2
      A     #_40ms
      =     L      2.3
      A     #_50ms
      =     L      2.4
      A     #_60ms
      =     L      2.5
      A     #_7xSms
      =     L      2.6
      A     #_8xSms
      =     L      2.7
      A     #_9xSms
      =     L      3.0
      A     #_10xSms
      =     L      3.1
//Then in OP you can evaluate output parametr #STATUS_IMPULSE
//by bit to bit. And on OP this must view like
// there was impulse output of sensor like ___0ms_||||||||||||||50ms_____
// on display of OP you can see ||||_ _ _ _ _ _
// and you can evaluate sharp op impulse without osscilloscope


//Start shot mesuaring
      A     #RESET
      FP    #FP_RESET
      R     #_1_SHOT_MESUARE
      R     #_10MS
      R     #_20MS
      R     #_30ms
      R     #_40ms
      R     #_50ms
      R     #_60ms
      R     #_7xSms
      R     #_8xSms
      R     #_9xSms
      R     #_10xSms




Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    plc.myforum.ro Forum Index -> PLC Tutorials All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro