Technical Forum

SINAMICS

script problem

Thread Starter: Graeme   Started: 5/19/2012 4:59 PM   Replies: 1

« Previous thread Next thread »
Page 1 of 1 (2 items)
  5/19/2012, 4:59 PM
Joined 6/4/2008
Last visit: 5/24/2013
Posts: 772
Rating:
Rated: Excellent [4.4 out of 5 / rated 227 time(s)]. (227) 
Rated: Above avarage [3 out of 5 / rated 1 time(s)]. (1) 
Graeme schrieb:
Hi All, In the attachment, I have modified the original trace script file which is still downloaded from here:
http://support.automation.siemens.com/WW/view/en/55652880

I have added a few little extras, the most significant being a rudimentary trigger.
The script monitors r947 for a state change (i.e. anything other than 0)

Limitations are of course that the text file will keep growing until either the "Cancel" button is pushed OR a fault is encountered.
Also, I struggled to try and make the trigger BIT operated (i.e. r968.3) which meant that any variable/binnector could be used as a trigger, but I failed cry
If anyone out there knows of a way, please post and we can develop the script further.

There is also a Trigger Low and Trigger High, and this ONLY relates to the GRAPH, basically, to try and mimic Drivemonitors vertical trigger line, the value of the trigger channel is 0 until the trigger even after which the value changes to 100 (so basically, you see a line where the trigger happened)
As a hint, if you are monitoring currents and torque values around 20 & 30, then it makes sense to make the Trigger Low = 20, and the Trigger High = 30, then you can see all the detail of the currents and torques.
I guess you need to play with it to see what I mean.

I have attached a graph of my drive accelerating and then decelerating after which I then triggered an EXTERNAL fault.
Note the current (Yellow, you can hardly see it, as I was tracing DC Link voltage which is up at around 350V)
So it would make sense to leave out the DC link volts if I wanted to closely monitor current for example.
The script now has 4 parameters which can be traced, so be sensible with the connection speed, at 9600 baud, you will see NOTHING valuable. Set the interface as FAST AS POSSIBLE.

If you don't want to monitor 4 parameters, you have a choice, you can either remove the parameters you don't want from the script file, or just monitor 1 parameter twice.

The script also writes the headings for the graph which makes it a little more readable.
The simple exchange of the Timestamp from the right hand side to the left hand side of the data series means one less step when importing into Excels Graph function.

Please be aware, that the original limitations ofthe script are still in force (i.e. "This FAQ only applies to SINAMICS G110, SIMATIC ET200S FC and, due to differences in the parameter structure, MICROMASTER 4 and SINAMICS CU240x with Firmware < V4.0")

As always, you take full resposibility for using this trace function - I have tested this on MM4 series and G120 (CU240s) - I have not tested this on G110, so please let me know if it works ok.

And finally, ALL credit is really for the original author of the script file - I just modified their good work. Rnf:lblSmileyTooltip_

Regards,
Graeme

Hi Huggy, I am tearing out my hair here, I am so close, I can resolve any bit below the value of 4000H (16384), but with any values greater that the 16384, I get overflow errors (obvious as I'm guessing the Dim specifies an Integer)

However, I can't find any other way to specify a variable with more capacity, if I use "Dim x As Float", then Starter Script does not recognise the "Float" or "Real" for that matter.

I am using a mathematical reduction method to resolve each individual bit (I'm sure you will agree it is very clunky), but it works upto 16384 at least.

For example . . .

Counter = 16384

If (Counter = 32768 Or Counter > 32768) Then
Bit_15 = 1
Result = Counter - 32768
Else: Bit_15 = 0
Result = Counter
End If

If (Counter = 16384 Or Counter > 16384) Then
Bit_14 = 1
Result = Counter - 16384
Else: Bit_14 = 0
Result = Counter
End If

and so on cascading down to a final "MOD 10" for Bit 0.

Clearly, I need to be able to resolve Bits 14 & 15.

Any Ideas?

p.s. I also tried a String Object that used the x.Position, but I lost the will to live
I refer to LINK
To be honest, I don't understand the function fully.

EDIT:
pps, I couldn't use the index as this is related to the parameter (those that have multiple indeces anyway), not the bit.

For example, r968 (Status word) does not have an index (0), but it has 16 bits.
Hope that makes sense
Regards,
Graeme

Attachment: Trace.zip  (8 Downloads)



=== Bearbeitet von Blue Moderator @ 21.05.2012 08:07 [GMT ] ===
splitted from Improved G110/G120 Tracing script

=== Edited by Graeme @ 5/19/2012 7:10 PM [GMT ] ===



There are 10 types of people . . .
Those who understand Binary, and those who don't.

Top
  5/21/2012, 4:34 AM
Joined 7/7/2010
Last visit: 5/22/2013
Posts: 1980
Rating:
Rated: Excellent [4.01 out of 5 / rated 201 time(s)]. (201) 
Rated: Above avarage [3 out of 5 / rated 1 time(s)]. (1) 
Perhaps you have discovered a hard limit?  I know many of the values max out at 4000H like max speed in Hz when sent as a command is 0-4000H = 0-Max Hz.

To me, that's a waste of a couple bits of resolution.  Maybe those bits are used for something?

Helpful? Rate it.
Solved? Post it.
Top
Page 1 of 1 (2 items)
Actions