kedi

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by kedi

  1. When I created a component to display a variable value, it initially displayed a whole row of the values of that variable incremented as in the sequence code. When specified MyVariable(0) in the component expression window, instead of just MyVariable, I then got just one, current instance of the variable value. Does every variable have a history generated? Can I force it to not have a history in the declaration of the variable? I ask in relation to the wimpy little laptop that the code is running on. Less overhead would be nice.
  2. I am glad to find out that the Alt key allows some more flexible paste options that help decrease a bit of typing.
  3. Yep. Found out all those things last night. After a while. Surprised that I can't declare multiple variables with a proper separator. Also that Variables are not case sensitive.
  4. Never mind. Some kind of other glitch. Channel was not updating for some reason. Saved, closed, reopened and it was working. Not perfectly but got it sorted from there. Odd. The channel table was updating in the channel view. But was not transferring to the a1 variable. Now it is. Might have been hanging onto previous channel settings and getting glitched.
  5. 1 global l=4320 // 12 hours of 10 second samples 2 global A1,A2,A3,A4,A5,TA1,TA2,TA3,TA4,TA5 3 while (l>0) 4 delay(10) 5 A1=(read(a1)/10) 6 A2=(read(a2)/10) 7 A3=(read(a3)/10) 8 A4=(read(a4)/10) 9 A5=(read(a5)/10) 10 TA1=(TA1+A1) 11 TA2=(TA2+A2) 11 TA3=(TA3+A3) 12 TA4=(TA4+A4) 13 TA5=(TA5+A5) 14 l-- 15 endwhile Keep getting this error in spite of trying other variations on declaring the variables. If I declare A1 and the other variables as A1=0, etc, up in line 1, the C1086 error indicates the error being in line 1. What am I doing wrong with the variables? a1 to a5 are channel names. C1086 One of the parameters was empty: DischargeWH Line 5 - Uncaught error in sequence DischargeWH
  6. Not working. I have channel in main group named a1 and channel in group T1, named t1. channel.a1.timing = 0 Does not change the timing. Nor does channel.t1.timing = 0.
  7. private string clist = channel.listAll("T1") for (private i = 0, i < numrows(clist), i++) execute("ClearHistory" + clist + ) endfor This throws an error. C1070 Not enough parameters for the given operator: Discharge Line 3 - Uncaught error in sequence Discharge I missed something here. Is is because it is a channel group? I need to use a different command parameter?
  8. I have Main channels, a1 to a4, on channels 0 to 3. I have group T1 channels, t1 to t3, also on channels 0 to 3. So Main and Group T1 are using same physical channels. I set Main channels to 1 sec timing. I set Group T1 channels to 0 timing. I get no error messages doing this. I have a table to display T1 channel values in 4 cells. Each cell shows value at a certain history point. I use a delay in the sequence, then Channel.ReadGroup("T1") to create the history at that point. But. The channel timing on Group T1 does not act as 0. It acts as 1 second timing. Is that just the way it is if you try and use the same physical channels across groups? The timing column being a hardware trigger as well as history update? Having T1 group set to 0 timing is over ridden? As well as the history entries being 1 second based? My goal is to have current value per second in one cell of the table. Historical interval values in the other cells. So Main a1 at 1 sec intervals, t1 interval samples in other cells. In the table cell expression to display the history value of a group channel, is t1(10) correct to show 10th history value. Or a specific group reference command? Using a Labjack U6-Pro by the way.
  9. Have channel group T. Want to clear the history of the whole group. Is there a one step command? Or do I need to loop?
  10. Is there a way to change all or some channel sample timings from within a sequence?
  11. So each channel has a separate history array? Three values, the record number, time and channel value? As it appears in the table of the channel? If you make a group of channels, does that create an array of more columns to encompass them in one array? I am being a pest about this history thing. But it seems to be a powerful resource, if I can understand it fully.
  12. A nice solution in many instances. I could do that 4 times with a 3 hour delay, to display my voltage snapshots, without them scrolling out. Referencing the history in the tables. It will not be compatible with my desire to graph the channels. But definitely thanks for the idea.
  13. I am dealing with 72 channels. It quickly becomes not simple. To get around the history update scheme now, I have to create 4X72 variables for the particular instance I am dealing with. Then I have to enter those 288 variables into expressions in 72 tables. I have to read the channels into those 288 variables so the data does not shift through. It is working. But the ability to just stop history update would save so much trouble and tricky coding. Also having the option of history increment from 0 instead of inserting at 0 would also be wonderful. With the ability to stop history. So compare a command like Stop_History, compared to if(updateHistory) myTestChannel.AddValue(myChannel[0]) endif For 72 channels.
  14. Is history an array or a log? I ask because I want to copy history into an array so I have more control over it. Is it called history as log or array? I wish to copy it to an array so I can refer to the array that I control as a resource.
  15. Please create a command to stop history update. I have a one time through sequence. After the sequence ends it may be some time till somebody notes the results. But results change even when the sequence has ended. To get around the issues that constant history updating causes, required multiple times the code and complication. Multiplying the chances for mistakes.
  16. I have an led that I want to be green if either of two values are 12 or above . The channel is a1, a1>=12 works fine. Toggles properly. I also have a variable a1d. I have tried a bunch of permutations of brackets and such to get this to work. a1 || a1d >=12. So if either a1 or a1d is 12 or more, the LED component will be green, else red. Never mind. I had declared the variable, but not assigned it a value. Now it seems happy. Moderator can delete this post if you like.
  17. It occurs to me that if Azeotech added another column to the history, that incremented from 0 to end of history. Then you could always reference the same row with that number. At least till history overwrites. Thanks for the loop example. I was going to try to figure that out. But haven't the time right now. The example will help. System is running with the ugly way of doing it.
  18. It is a batch. I have a start button for the sequence. Been using it as is for years. But need to tighten up the code now.
  19. I am not familiar with how dynamic the array system is here. Been a long time since I did anything with arrays at all. More hardware than software for quite some time now. Needed some info to edit a running system that I built and coded a few years ago. Constrained by time and having the system always running. Will investigate the array scheme separately. Thanks for the reply.
  20. I went the variable route. Unfortunate with so many channels, but it works. I did want the voltage at that time, not averages. Seeing as I was doing all that messing about I made graphs for all the channels as well. In case the boss wanted a more detailed look. ( he usually does ). The idea is to have voltages at 3 hour intervals to judge how badly a battery failed. They are lithium ion with series parallel cells, so you can gain some information of the failure mode with snapshots of voltages. The graphs will help even more. The thermal management of the rig was fun too. 72 batteries at about 1.4 amps 14.8 volts. This situation of being able to easily grab a point in history made me think that dual history lists might be nice. One that starts at one or zero and increments, as well as or instead of one that adds a 0 base record and shifts all the rest up. I see the benefits of record zero always being now, but also benefits the other way. If it adds records instead of shifting, you can grab history at X seconds and it will always remain the same. Unless it has gone so long as to cause overwrite.
  21. I am monitoring 72 channels for 12 hours. I am trying to display a value from each channel every 3 hours in a table for each channel. This works in a way. Each cell in the table displays the history of the channel at 10800 sample intervals. But due to the way history updates, it only displays properly at the 12 hour mark. All 4 cells display the voltage at that point in history. But then the history continues to update and push the values out of sync. I'm okay with it being out of sync until hour 12. But I want the values to be left unchanged after that. So people can see the results at any time after the run. So. Is there a way to completely stop history from updating after 43200 samples? Limiting the history to 43200 does not work. It just starts overwriting the history.
  22. First post. I find the Guide to be very sparse on array information. I need the basics. How to create a 4 x 72 array named channels. ( I think I know this much ) How to insert a value read from a channel into that array. ( channels(3,62)=channel62 for instance ?) How to reference a value in the array to display in a table. (Expression in the table component ( channel(3,62)?) Right now I don't know the different formats to access the array. Creating, inputting to it, reading from it.