Red Lion Crimson 3 Programming Assistance

here i go again.

im using: portinput(2,126,127,1000,0)

and read t package:
7E 02 04 09 04 05 06 07 08 09 7F
it gets it allright

but if i iinsert some 00 in the package, lets say..
7E 02 04 09 04 00 05 06 07 08 09 7F
it gets only
02 04 09 04

it takes the "00" as end of package, is there a way to make t DSP take the full string?
 
here i go again.

im using: portinput(2,126,127,1000,0)

and read t package:
7E 02 04 09 04 05 06 07 08 09 7F
it gets it allright

but if i iinsert some 00 in the package, lets say..
7E 02 04 09 04 00 05 06 07 08 09 7F
it gets only
02 04 09 04

it takes the "00" as end of package, is there a way to make t DSP take the full string?

0 is considered a null and is not valid in the portinput command. If you string will contain a zero you must use the portread command and bring in each character seperatly
 
Notice in their manual how they specify the start as an int but the example shows a string?

Hmmmm...

I think you might be mistaking the single quote in the example as a double quote. The single quote '*' will convert the character to int. If it were a double quote "*" then yes it would be looking for a string.

Thanks
Jeremy
 
thanks i already solved my quest using portread:

-------------------------
//usando portread.
int i,j,k,h;

for(i=0;i<50;i++){
h=PortRead(2,10);
if(h<0){
break;
}else{
crctrs[0]=h;
for(j=1;j<50;j++){
crctrs[j]=-1;
h=PortRead(2,10);
if(h<0){
break;
}else{
crctrs[j]=h;
}
}
}
}
---------------
 
no email

hi red lion guys, its me again.
i was having trouble making a G310 send me an email.. after a lot of revision of parameters and random changes i (still dont know why) changed the gateway of the ethernet port setting and to my surprise it worked!

i had
IP:192.168.1.67
MSK:255.255.255.0
GWY:192.168.1.254
no emails were sent

and changed to:
IP:192.168.1.67
MSK:255.255.255.0
GWY:192.168.1.99
emails sent

can anyone explain to me what happened? thanks in advice.
 
hi red lion guys, its me again.
i was having trouble making a G310 send me an email.. after a lot of revision of parameters and random changes i (still dont know why) changed the gateway of the ethernet port setting and to my surprise it worked!

i had
IP:192.168.1.67
MSK:255.255.255.0
GWY:192.168.1.254
no emails were sent

and changed to:
IP:192.168.1.67
MSK:255.255.255.0
GWY:192.168.1.99
emails sent

can anyone explain to me what happened? thanks in advice.

If you are using a gateway that means that your network requires a router to get from your subnet 192.168.1.xxx to another subnet (where your mail server is in this case). The gateway needs to be the IP of that router.
 
email

when using the function sendmail, i can define the header and the body of the email but when i send the email via the tag alarm the header and body is the same (the text in the "event name" window). is there a way to define different texts for those via the tag alarm? tnks
 

Similar Topics

How do you install update on Red Lion Crimson ver 3.1. Do I just need to run the exe file on the host server?
Replies
1
Views
110
Hi, I am trying to increase the size of the user login pop up using a Red Lion CR1000 7” HMI with Crimson 3.1 software. The login pop up is very...
Replies
2
Views
686
Hello, We are currently running a bunch of g310's connected to their SLC5 PLCs through ethernet. I've attempted to upgrade the program from 2.0...
Replies
1
Views
1,126
Hi I have been using Red Lion products for some time, I had a thought over the bank holiday weekend, As you do. It would be nice if whenever a...
Replies
4
Views
1,023
Well, I have yet another question for the great minds on this forum! We have a red lion HMI for one of our machines and every time I hook my...
Replies
11
Views
1,677
Back
Top Bottom