
Reading the online help will show you what dataa type is expected for all parameters, as i said before. For example SFB1 is a IEC CU (Counter Up) instruction, which works with integer parameters, and counts up to 32764 instead of a limit of (BCD)999. If you cannot adapt to Step 7 basic instructions, look at their IEC alternatives in the Standard and System Function library. Take the time to read and understand these requirements and you will make your life easier. The F1 key on an instruction will open a help file which, amongst other things will point out what data types are expected for Step 7 instructions parameters. If you want to make your transition to Step 7 less frustrating, do not presume all you learned in the world of Rockwell translates point for point, and lose the " I can't believe that you cannot. The internet is big but not big enough just yet to contain a *.k7p file for download.Please help me out with this one.Thanxįirst, an answer to your queestion: presets for counters are not expecting n integer value, but a Counter data type value, written C#3 for a value of 3. I saw in the absolutely useless sample program they provide that some data blocks are used and there you can do that.ĭo you must use data blocks in a program or for a simple program you could get away just using the symbol table tags?Ĭould somebody explain this to me.Maybe even give me a sample file illustrating this? So I have counter C1 and I want to assign a value of 3 for the preset for this counter.ĭo you have to use a move instruction somewhere at the beginning of the program to move a value of 3 into the "C1_PRE" or there is another way to make that integer value 3.

I've read the literature from the installation CD and started to make my program I went quite ok untill I reached a point where I have to use a all counters have a preset number.So I created in OB1 a tag or symbol of INT type but I can't believe that you cannot assign a value for that symbol. I am probably preconditioned by Allen Bradley but I saw that this is different big time.
#STEP 7 MICRO WIN COMPILE ERROR SERIES#
SaveSetting CurrentProject.Name, "Users", "name" & i, arrTypedUser(i).I am brand new with Siemens 300 series.I did little work with 200 series using Microwin software.My main problem is that I was given a small project as a starter with STEP 7 Lite V3 and I have quite a few questions. SaveSetting CurrentProject.Name, "Users", "auth" & i, arrTypedUser(i).AuthBy

SaveSetting CurrentProject.Name, "Users", "count", iTotal If MsgBox("Delete #" & iOut, vbYesNo) = vbYes Then Saving 'see Sub below IOut = InputBox("Which # to delete?",, 1) If MsgBox("Save the new one?", vbYesNo) = vbYes Then Saving 'see Sub belowĭim i As Integer, iOut As Integer, iTotal As Integer ReDim Preserve arrTypedUser(UBound(arrTypedUser) + 1)ĪrrTypedUser(ilndex).Name = InputBox("New Username")ĪrrTypedUser(ilndex).Pass = InputBox("New Password")ĪrrTypedUser(ilndex).AuthBy = "authorizied by" & sUser If sSettings = "" Or sSettings = "0" ThenĪrrTypedUser(i).Name = GetSetting(CurrentProject.Name, "Users", "name" & i)ĪrrTypedUser(i).Pass = GetSetting(CurrentProject.Name, "Users", "pass" & i)ĪrrTypedUser(i).AuthBy = GetSetting(CurrentProject.Name, "Users", "auth" & i) SSettings = GetSetting(CurrentProject.Name, "Users", "Count")

MsgBox "To do this later, use Ctrl + Shift + U" If MsgBox("Would you like to delete on user?", vbYesNo) = vbYes Then Deleting 'see Sub below If MsgBox("Would you like to add a new user?", vbYesNo) = vbYes Then Adding 'see Sub below If sUser = "Admin" Then Listing 'see Sub below If arrTypedUser(i).Name = sUser And arrTypedUser(i).Pass = sPass Then SPass = InputBox("What is your password?",, Secret) (When I attempt to run anyway, from the line above 'admin' is highlighted?) SUser = InputBox("What is your username?",, Admin) ( By the left of the line above there is a yellow arrow?)ĭim i As Integer, j As Integer, sPass As String, ilndex As Integer 'Macro|Submacro: ^+U| RunCode:Authorizing()| Save as AutoKeys macro This is my following module, so is there anything in this that could be a problem too? Conversely, I know the other option is that my macro security is at the highest setting and if so how would I resolve this too? Root of my problems (as access may see this as an untrusted location). Which I believe because I am working on a school network it could be the
#STEP 7 MICRO WIN COMPILE ERROR CODE#
I am currently working on a database for a school project, Whenever I attempt to run my module that is linked by an AutoExec and AutoKeys, it fails to work with an error code 2001.
