NI-3100 works only when the Diagnostic Net Linxs This On.
Anarckos
Posts: 41
Very strange. My code runs only when the diagnosis of active Netlinxs eta. when I turn it to work.
Example: I'm clicking a button (input NXC-I / O 10) and runs a command to change the state of a relay (NXC-REL 10). all wheel when the diagnosis is active. When off, everything stops working. By Reconnect everything work again. and so on
I thought of many possibilities, but found no solution.
what did I do wrong?
System features:
- Central Controller NI-3100 - [0:1:1]
- CardFrame 1 = 12 IRs - # 25 [301:1:1] to [312:1:1]
- CardFrame 2 = 12 I/O - # 26 [313:1:1] to [324:1:1]
- CardFrame 3 = 12 Relays - # 25 [325:1:1] to [336:1:1]
All actions performed by the central one is sent SEND_STRING 0, "' Action Performed .....'"
Sorry for my English, translated by google
Example: I'm clicking a button (input NXC-I / O 10) and runs a command to change the state of a relay (NXC-REL 10). all wheel when the diagnosis is active. When off, everything stops working. By Reconnect everything work again. and so on
I thought of many possibilities, but found no solution.
what did I do wrong?
System features:
- Central Controller NI-3100 - [0:1:1]
- CardFrame 1 = 12 IRs - # 25 [301:1:1] to [312:1:1]
- CardFrame 2 = 12 I/O - # 26 [313:1:1] to [324:1:1]
- CardFrame 3 = 12 Relays - # 25 [325:1:1] to [336:1:1]
All actions performed by the central one is sent SEND_STRING 0, "' Action Performed .....'"
Sorry for my English, translated by google
0
Comments
G'day Anarckos,
You will need to supply some code or a better description of the problem.
What you've given so far is not enough information.
Cheers
I will post a summary of the Code.
OK, I have...
Variables...
Start
Channel Events - Pulsator, Idea is here to Create a TIMELINE to control the time of the pulse. Short or Long.
TimeLine Event, Perform actions during the long pulse.
Ok, this is the basic logic of my code.
The functions, ON / OFF Commands Work ... the problem is that they work only when when I'm tracking messages by Netlinxs. Whether or when the diagnostic option is active. Immediately to shut down it stops working. I'm having to leave my notebook on the client to work. it's like the AMX depended on him to perform.
The only thing is that in my testing, the TPs are not on the network. Only the Central CardFrame and dimmers. but I think it would not be problem.
the points of light are actuated as follows ... Of course, before Logica has all but in the end it ends up being.
When Dimmer:
SEND_LEVEL dv_Living_Light_XYZ, ch_Living_Light_XYZ, 255
When Relay:
ON [dv_Living_Light_ABC, ch_Living_Light_ABC]
Very strange, I think the plant was affected by solar flare heheh.
Line 3:: Cheap: New - Insufficient memory for alloc! Task = tinterpret) - 13:52:27
Line 4:: Cheap: New - Error (Task = tinterpret) - 13:52:27
Line 5: CIpTempMan: length = 4008636142 QuickCreateCharString - 13:52:27
Line 6: CIpLibrary: Mid_String - Error - 13:52:27
Line 7:: Cheap: New - Insufficient memory for alloc! Task = tinterpret) - 13:52:27
Line 8:: Cheap: New - Error (Task = tinterpret) - 13:52:27
Line 9: CIpTempMan: QuickCreateCharString length = 515942410 - 13:52:27
Line 10: CIpLibrary: Mid_String - Error - 13:52:27
Scary!
Defeitinhos had some code in the above error has been fixed. but the main problem still remains! has already lost 3 pounds of hair
You can't do this..
TP_5200i = 10001:0:1
0 is an invalid port number!
Whenever you use SET_VIRTUAL_* it should always be followed by a rebuild event E.G;
{
SET_VIRTUAL_LEVEL_COUNT(Virtual_TP_Bar, 27) // Raises amount of TP Virtual Levels
REBUILD_EVENT()
}
more soon...
Here's some ideas I had.
Cheers
Thank you for your mush.
Here too complacent and the Code, without returning errors. some warnings, but is due rather to use string (CHAR).
The Code I have is quite long, and has many comments in Portuguese. because I'm Brazilian. here we were unsupported amx for a while. so catch these things. But I'll tell you. maybe they are able to see some detail.
Well, what I just found out with new tests, is that this problem occurs only with the I/Os. ie when I get a pulse on I/O it is understood only when the diagnosis is active. Emulate the Touch and Receive a run without the need for diagnosis to be active.
The only difference is that with the I/O I'm creating a TIME_LINE to see if the pulse is short or long. the panel does not need to go through this option.
Now I think that we reduce the variables. This in some detail in I/O or TIME_LINE.
Some of my parameters are sent as a STRING (or CHAR) never quite understood that the question of texts AMX ... but okay.
The idea was to send as parameter as follows:
function ('Rum_IT'), but the function only received part of a parameter, something like
'R' ... the idea of trying to pass all characters, I MID_STRING we used the ('Rum_IT', 1, LENGTH_STRING ('Rum_IT')). thinking this would all characters. was working but not nice ..
Now I'm having to manually count the characters. Passing this way:
function (MID_STRING ('Rum_IT', 1,6)).
With this work.
this could be simpler. I imagine it must have some way to send only function ('Rum_IT')... but still do not know how.
the Stranger is that it worked with the active Dignostico .. makes no sense to me.
but okay .. let them out.
Thanks Mush. you was a great help. Sorry about that, but here in Brazil, we have good courses of AMX for now. looks like it will start to improve now. why I did some travel, and get these simple details.
Thanks.
This was not the problem.
Soon when you get home, I will describe. but it is solved.
DEFINE_FUNCTION func_ACOES_Iluminacao(CHAR vCircuito_Nome, DEV vDev_Circuito, INTEGER vCh_Circuito, CHAR vAcao) X
DEFINE_FUNCTION func_ACOES_Iluminacao(CHAR vCircuito_Nome[highlight][][/highlight], DEV vDev_Circuito, INTEGER vCh_Circuito, CHAR vAcao[highlight][][/highlight])✔
char == 1 byte == '1' (this is a CHAR)
char[8] == 8 bytes == '12345678' (this is a CHAR array or string)
char[] == n bytes == '1' or '1234' or '12345678' etc. (this is a CHAR array or string)
example
DEFINE_VARIABLE
char cMyChar
char cMyCharArray[] = '12345678' [highlight]or[/highlight] char cMyCharArray[8] (The size must be initialised at compile time if you do define the size of the array)
Do this instead.
WARNING: func_ACOES_Pulsadores_LIVING.axi(93): C10571: Converting type [string] to [CHAR]
This is an important warning!!! You need to investigate these, especially if you are unsure why they are happening.
Do you only have one TPD4 file for all the touch panels?
Can you please send it to me?
Cheers
I'm making the corrections. There are many things to fix. I never knew how to work well in String NetLinx, now became clear. Thanks.
But I think the problem was due to DEFINE_EVENT Previous
I was ...
DEFINE_EVENT
TIMELINE_EVENT [.....]
{
}
CHANNEL_EVENT [.....]
{
}
BUTTON_EVENT [....]
{
}
It seems that the program was Considerant Only TIMELINE_EVENT. I noticed this when I was testing a Button_event, he only ran when he was high on the list of Events.
So did the following:
DEFINE_EVENT
TIMELINE_EVENT [.....]
{
}
DEFINE_EVENT
CHANNEL_EVENT [.....]
{
}
DEFINE_EVENT
BUTTON_EVENT [....]
{
}
This way is working. I am a little time to see if this is right.
Layout of my touch, it was all designed by me. normally would not anyone. but send me an email that I will return with the files.
beckerautomacao@gmail.com
You should not have to do this as all of your AXI files are declared under DEFINE_EVENT.
I will look into it further and get back to you.
I've sent you an e-mail.
If you are concerned about copyright you can make the file open to view only.
I just wanted to use it to understand all of your level declarations and combines.
Cheers
It does not work on my test system!
How are you dealing with button presses?
Did you send all the code?
I like the panel design, very nice!
Thanks, I wanted it to be unique! It took awhile, but I liked the result too!
Hmm... maybe babelfish for the next translation.
I do not understand most of that.
hehehe sorry ... google.
I tried to say: I did all the programming in the dark. without being able to test. the equipment were being assembled. then created all my logic, did not work. I'm losing a lot of time to fix.
My next investment will be in a good English course!
If you need more than one port you need to use SET_VIRTUAL_PORT_COUNT()
humm... very tanks!