Red Lion DSPSX Raw Serial Port

I'm not sure why that would be but you can reverse the logic by changing the alarm mode to Data Mismatch instead of Data Match.
 
Hi Guys,

Datalogging unit based around a DSPSX from Red Lion fitted with a CF card. Basically it will take the RS232 output from a device and log the tension values over time internally on the card.

Could I know how many hours datalogging could be saved if we were to log once per second, before the DSP starts erasing old data ?

The output string from a device is 8 character long. e.g. 00010.0t

Help is appreciated

Cheers
Amit
 
Under the data logging options in Crimson, the largest values it allowed me to enter were 86400 samples per file (that's 1 day if you're logging every second) and 200 files to be retained.

So I would guess that you could log for 200 days before it starts wiping out data. Provided that your CF card is large enough, of course.
 
I don't know if it will help you but here is a raw serial program that I wrote for a G3 Kadet some time ago. This is communicating with a RS232 device that writes data to a USB flash drive. In this application, I always first send a command to the device, then wait for a response. The while(PortRead...) statement is a trick I learned from tech support. It clears out the serial buffer so you don't get any garbage characters during the PortInput.

I do remember that it took a lot of trial and error to get this set up correctly, but it has worked flawlessly ever since.


Code:
// CREATE & OPEN FILE FOR WRITING (HANDLE=1)
USBwriteAction := 1;
while(PortRead(4, 0) > -1) {}
PortPrint(4,"O 1W>" + MakeFilename() + "\r");
response := PortInput(4,0,0,1000,4);
if(response == ""){ USBwriteCode := 0xFF; return; }
USBwriteCode := TextToInt(Mid(response, 1, 2), 16);
if(USBwriteCode > 0) return;

// WRITE DATA TO FILE
for(i:=0; i<=24; i++){
    USBwriteAction := 0x10 + i;
    while(PortRead(4, 0) > -1) {}
    PortPrint(4,"W 1>" + IntToText(Len(USBwriteArray[i]),16,2) + "\r");
    response := PortInput(4,0,0,1000,4);
    if(response == ""){ USBwriteCode := 0xFF; return; }
    USBwriteCode := TextToInt(Mid(response, 1, 2), 16);
    if(USBwriteCode > 0) return;

    USBwriteAction := 0x30 + i;
    while(PortRead(4, 0) > -1) {}
    PortPrint(4,USBwriteArray[i]);
    response := PortInput(4,0,0,1000,14);
    if(response == ""){ USBwriteCode := 0xFF; return; }
    USBwriteCode := TextToInt(Mid(response, 11, 2), 16);
    if(USBwriteCode > 0) return;
}

// CLOSE FILE
USBwriteAction := 2;
while(PortRead(4, 0) > -1) {}
PortPrint(4,"C 1\r");
response := PortInput(4,0,0,1000,4);
if(response == ""){ USBwriteCode := 0xFF; return; }
USBwriteCode := TextToInt(Mid(response, 1, 2), 16);
if(USBwriteCode > 0) return;
Many thanks for the while(PortRead) tip.
I was going crazy.
If I had a hat, I would tip it.
Yas
 
serial data transfer in redlion HMI

Hello ,

i have been trying to send serial data from industrial scale which has serial out. can you guys help me.
 
When you say serial I'm assuming you mean raw ASCII, if that's not the case than ignore what I'm about to say.

1. Go to the "Data Tags" Tab and create a string tag.

2. Go to the "Communications" Tab and set a serial port on your Redlion unit to "Raw serial port", and set the appropriate comms settings.

3. In the "On update" field type "<Tag name> = PortInput(0,0,0,0,0)" look up the PortInput function in the Reference manual for the correct values to use


Hope this helps



Hello ,

i have been trying to send serial data from industrial scale which has serial out. can you guys help me.
 

Similar Topics

Hello all, thanks for reading! This is my first post so please be gentle. I have a difficult scenario that I'm struggling to make work. I have a...
Replies
6
Views
3,049
Hello, I am trying to take data from PAXI (with RS485 comms cards) and log it using a DSPSX. I have the PAXI hooked to a rotary length...
Replies
4
Views
2,978
Hi, We are trying to connect (for the 1st time) a Red Lion DSPSX to a Siemens S7. Unfortunately I do not have the S7 in front of me but I have...
Replies
0
Views
3,601
Hi folks, I got four PAXS and one PAXD connected to DSPSX via RS485. Each meter has its own number and baud rate is 9600,data bit 8, stop bit 1...
Replies
4
Views
2,143
I am having trouble using Sync Manager with a MicroLogix 1100. I am reading a 20 digit barcode and adding some more information then using the...
Replies
0
Views
2,818
Back
Top Bottom